Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
| @@ -304,11 +304,11 @@ class BTemplateLogic extends BaseLogic | @@ -304,11 +304,11 @@ class BTemplateLogic extends BaseLogic | ||
| 304 | * @time :2023/12/13 15:39 | 304 | * @time :2023/12/13 15:39 |
| 305 | */ | 305 | */ |
| 306 | public function handleAllHtml($commonInfo,$html){ | 306 | public function handleAllHtml($commonInfo,$html){ |
| 307 | - if(!empty($commonInfo)){ | 307 | + if(!empty($commonInfo['head_html']) && !empty($commonInfo['footer_html'])){ |
| 308 | $html = preg_replace('/<header\b[^>]*>(.*?)<\/header>/s', $commonInfo['head_html'], $html); | 308 | $html = preg_replace('/<header\b[^>]*>(.*?)<\/header>/s', $commonInfo['head_html'], $html); |
| 309 | $html = preg_replace('/<footer\b[^>]*>(.*?)<\/footer>/s', $commonInfo['footer_html'], $html); | 309 | $html = preg_replace('/<footer\b[^>]*>(.*?)<\/footer>/s', $commonInfo['footer_html'], $html); |
| 310 | - $html = preg_replace('/<style id="globalsojs-header">(.*?)<\/style>/s', $commonInfo['head_css'], $html); | ||
| 311 | - $html = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', $commonInfo['footer_css'], $html); | 310 | + $html = preg_replace('/<style id="globalsojs-header">(.*?)<\/style>/s', $commonInfo['head_style'] ?? '', $html); |
| 311 | + $html = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', $commonInfo['footer_style'] ?? '', $html); | ||
| 312 | } | 312 | } |
| 313 | return $html; | 313 | return $html; |
| 314 | } | 314 | } |
-
请 注册 或 登录 后发表评论