作者 lyh

gx

@@ -226,13 +226,13 @@ class BTemplateLogic extends BaseLogic @@ -226,13 +226,13 @@ class BTemplateLogic extends BaseLogic
226 public function saveCommonTemplate($param){ 226 public function saveCommonTemplate($param){
227 $templateCommonModel = new BTemplateCommon(); 227 $templateCommonModel = new BTemplateCommon();
228 $info = $templateCommonModel->read(['template_id'=>$param['template_id'],'project_id'=>$this->user['project_id']]); 228 $info = $templateCommonModel->read(['template_id'=>$param['template_id'],'project_id'=>$this->user['project_id']]);
229 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export(characterTruncation($param['html'],'/<link id="google-fonts-link"\b[^>]*>(.*?)<header/'), true) . PHP_EOL, FILE_APPEND); 229 +
  230 + @file_put_contents(storage_path('logs/lyh_error.log'), var_export(characterTruncation($param['html'],'/<link id="google-fonts-link"[^<]*<header/'), true) . PHP_EOL, FILE_APPEND);
230 $data = [ 231 $data = [
231 'head_html'=>$param['head_html'], 232 'head_html'=>$param['head_html'],
232 'head_css'=>$param['head_css'], 233 'head_css'=>$param['head_css'],
233 'footer_html'=>$param['footer_html'], 234 'footer_html'=>$param['footer_html'],
234 'footer_css'=>$param['footer_css'], 235 'footer_css'=>$param['footer_css'],
235 -  
236 'other'=>str_replace('<header','',characterTruncation($param['html'],'/<link id="google-fonts-link"\b[^>]*>(.*?)<header/')), 236 'other'=>str_replace('<header','',characterTruncation($param['html'],'/<link id="google-fonts-link"\b[^>]*>(.*?)<header/')),
237 ]; 237 ];
238 if($info === false){ 238 if($info === false){