正在显示
3 个修改的文件
包含
12 行增加
和
5 行删除
| @@ -277,7 +277,8 @@ class BTemplateLogic extends BaseLogic | @@ -277,7 +277,8 @@ class BTemplateLogic extends BaseLogic | ||
| 277 | 'footer_html'=>$param['footer_html'], | 277 | 'footer_html'=>$param['footer_html'], |
| 278 | 'footer_css'=>$param['footer_css'], | 278 | 'footer_css'=>$param['footer_css'], |
| 279 | ]; | 279 | ]; |
| 280 | - $other = str_replace('<header','',characterTruncation($param['html'],'/<link id="google-fonts-link".*?<header/s')); | 280 | + $footer_other = str_replace('<header','',characterTruncation($param['html'],'/<style id="globalsojs-footer">(.*?)<header/s')); |
| 281 | + $other = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other); | ||
| 281 | if($info === false){ | 282 | if($info === false){ |
| 282 | $data['template_id'] = $param['template_id']; | 283 | $data['template_id'] = $param['template_id']; |
| 283 | $data['project_id'] = $this->user['project_id']; | 284 | $data['project_id'] = $this->user['project_id']; |
| @@ -335,8 +336,9 @@ class BTemplateLogic extends BaseLogic | @@ -335,8 +336,9 @@ class BTemplateLogic extends BaseLogic | ||
| 335 | 'main_css'=>$param['main_css'], | 336 | 'main_css'=>$param['main_css'], |
| 336 | 'footer_html'=>$param['footer_html'], | 337 | 'footer_html'=>$param['footer_html'], |
| 337 | 'footer_css'=>$param['footer_css'], | 338 | 'footer_css'=>$param['footer_css'], |
| 338 | - 'other'=> str_replace('<header','',characterTruncation($param['html'],'/<link id="google-fonts-link".*?<header/s')) | ||
| 339 | ]; | 339 | ]; |
| 340 | + $footer_other = str_replace('<header','',characterTruncation($param['html'],'/<style id="globalsojs-footer">(.*?)<header/s')); | ||
| 341 | + $data['other'] = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other); | ||
| 340 | $bTemplateLogModel = new BTemplateLog(); | 342 | $bTemplateLogModel = new BTemplateLog(); |
| 341 | return $bTemplateLogModel->add($data); | 343 | return $bTemplateLogModel->add($data); |
| 342 | } | 344 | } |
| @@ -136,8 +136,9 @@ class CustomTemplateLogic extends BaseLogic | @@ -136,8 +136,9 @@ class CustomTemplateLogic extends BaseLogic | ||
| 136 | 'footer_css'=>characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<\/style>/s'), | 136 | 'footer_css'=>characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<\/style>/s'), |
| 137 | 'main_html' => characterTruncation($html,'/<main\b[^>]*>(.*?)<\/main>/s'), | 137 | 'main_html' => characterTruncation($html,'/<main\b[^>]*>(.*?)<\/main>/s'), |
| 138 | 'main_css' => characterTruncation($html,'/<style id="globalsojs-styles">(.*?)<\/style>/s'), | 138 | 'main_css' => characterTruncation($html,'/<style id="globalsojs-styles">(.*?)<\/style>/s'), |
| 139 | - 'other'=> str_replace('<header','',characterTruncation($html,"/<link id=\"google-fonts-link\"(.*?)<header/s")) | ||
| 140 | ]; | 139 | ]; |
| 140 | + $footer_other = str_replace('<header','',characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<header/s')); | ||
| 141 | + $data['other'] = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other); | ||
| 141 | $bTemplateLogModel = new BTemplateLog(); | 142 | $bTemplateLogModel = new BTemplateLog(); |
| 142 | return $bTemplateLogModel->add($data); | 143 | return $bTemplateLogModel->add($data); |
| 143 | } | 144 | } |
| @@ -160,7 +161,8 @@ class CustomTemplateLogic extends BaseLogic | @@ -160,7 +161,8 @@ class CustomTemplateLogic extends BaseLogic | ||
| 160 | 'footer_html'=>characterTruncation($html,'/<footer\b[^>]*>(.*?)<\/footer>/s'), | 161 | 'footer_html'=>characterTruncation($html,'/<footer\b[^>]*>(.*?)<\/footer>/s'), |
| 161 | 'footer_css'=>characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<\/style>/s'), | 162 | 'footer_css'=>characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<\/style>/s'), |
| 162 | ]; | 163 | ]; |
| 163 | - $other = str_replace('<header','',characterTruncation($html,"/<link id=\"google-fonts-link\"(.*?)<header/s")); | 164 | + $footer_other = str_replace('<header','',characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<header/s')); |
| 165 | + $other = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other); | ||
| 164 | if($info === false){ | 166 | if($info === false){ |
| 165 | $data['template_id'] = $template_id; | 167 | $data['template_id'] = $template_id; |
| 166 | $data['project_id'] = $this->user['project_id']; | 168 | $data['project_id'] = $this->user['project_id']; |
| @@ -341,6 +341,8 @@ class VisualizationLogic extends BaseLogic | @@ -341,6 +341,8 @@ class VisualizationLogic extends BaseLogic | ||
| 341 | 'footer_html'=>characterTruncation($html,'/<footer\b[^>]*>(.*?)<\/footer>/s'), | 341 | 'footer_html'=>characterTruncation($html,'/<footer\b[^>]*>(.*?)<\/footer>/s'), |
| 342 | 'footer_css'=>characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<\/style>/s'), | 342 | 'footer_css'=>characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<\/style>/s'), |
| 343 | ]; | 343 | ]; |
| 344 | + $footer_other = str_replace('<header','',characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<header/s')); | ||
| 345 | + $data['other'] = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other); | ||
| 344 | $bTemplateLogModel = new BTemplateLog(); | 346 | $bTemplateLogModel = new BTemplateLog(); |
| 345 | return $bTemplateLogModel->add($data); | 347 | return $bTemplateLogModel->add($data); |
| 346 | } | 348 | } |
| @@ -362,7 +364,8 @@ class VisualizationLogic extends BaseLogic | @@ -362,7 +364,8 @@ class VisualizationLogic extends BaseLogic | ||
| 362 | 'footer_html'=>characterTruncation($html,'/<footer\b[^>]*>(.*?)<\/footer>/s'), | 364 | 'footer_html'=>characterTruncation($html,'/<footer\b[^>]*>(.*?)<\/footer>/s'), |
| 363 | 'footer_css'=>characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<\/style>/s'), | 365 | 'footer_css'=>characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<\/style>/s'), |
| 364 | ]; | 366 | ]; |
| 365 | - $other = str_replace('<header','',characterTruncation($html,"/<link id=\"google-fonts-link\"(.*?)<header/s")); | 367 | + $footer_other = str_replace('<header','',characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<header/s')); |
| 368 | + $other = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other); | ||
| 366 | if($info === false){ | 369 | if($info === false){ |
| 367 | $data['template_id'] = $template_id; | 370 | $data['template_id'] = $template_id; |
| 368 | $data['project_id'] = $this->user['project_id']; | 371 | $data['project_id'] = $this->user['project_id']; |
-
请 注册 或 登录 后发表评论