yingzi il y a 2 ans
Parent
commit
559c223062
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      app/system/controller/ShowTemplate.php

+ 1 - 1
app/system/controller/ShowTemplate.php

@@ -79,7 +79,6 @@ class ShowTemplate extends  BaseController{
         $id = empty($post["id"])?0:(int)$post["id"];
         $codeWhere[]=["code","=",$save["code"]];
         if($id>0){
-            $save["time"] = time();
             $codeWhere[]=["id","<>",$id];
         }
         $count = (new ShowTemplateModel)->where($codeWhere)->where("id","<>",$id)->count();
@@ -88,6 +87,7 @@ class ShowTemplate extends  BaseController{
         }
         $r=0;
         if(empty($id) || $id=="0"){
+            $save["time"] = time();
             $r = (new ShowTemplateModel)->insert($save);
         }else{
             $r = (new ShowTemplateModel)->where("id",$id)->update($save);