瀏覽代碼

* The censorship cache cleanup command has been moved to the model

Visman 6 年之前
父節點
當前提交
0074c36e8b
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 2 0
      app/Models/Censorship/Save.php
  2. 0 2
      app/Models/Pages/Admin/Censoring.php

+ 2 - 0
app/Models/Censorship/Save.php

@@ -58,6 +58,8 @@ class Save extends Method
             $this->c->DB->exec($sql, $vars);
         }
 
+        $this->c->Cache->delete('censorship');
+
         return $this->model;
     }
 }

+ 0 - 2
app/Models/Pages/Admin/Censoring.php

@@ -36,8 +36,6 @@ class Censoring extends Admin
 
                 $this->c->censorship->save($v->form);
 
-                $this->c->Cache->delete('censorship'); //????
-
                 return $this->c->Redirect->page('AdminCensoring')->message('Data updated redirect');
             }