|
...
|
...
|
@@ -87,13 +87,12 @@ class ReplaceHtmlLog extends Command |
|
|
|
if($info['template_id'] == 0){
|
|
|
|
$bTemplateModel->formatQuery($condition)->update(['html' => DB::raw("REPLACE(html, '$old_html', '$html')")]);
|
|
|
|
}else{
|
|
|
|
echo json_encode($condition);
|
|
|
|
die();
|
|
|
|
$bTemplateModel->formatQuery($condition)
|
|
|
|
$bTemplateModel->where($condition)
|
|
|
|
->update([
|
|
|
|
'main_html' => DB::raw("REPLACE(main_html, ?, ?)", [$old_html, $html]),
|
|
|
|
'updated_at' => date('Y-m-d H:i:s'),
|
|
|
|
'main_html' => DB::raw("REPLACE(main_html, '" . addslashes($old_html) . "', '" . addslashes($html) . "')"),
|
|
|
|
'updated_at' => now(),
|
|
|
|
]);
|
|
|
|
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
...
|
...
|
|