UpdateBjsTemplates.php
authorAlan <alan@roojs.com>
Fri, 24 Feb 2023 07:29:56 +0000 (15:29 +0800)
committerAlan <alan@roojs.com>
Fri, 24 Feb 2023 07:29:56 +0000 (15:29 +0800)
UpdateBjsTemplates.php

index d7bbe77..de33f7e 100644 (file)
@@ -175,7 +175,16 @@ class Pman_Cms_UpdateBjsTemplates extends Pman_Admin_UpdateBjsTemplates
         }
         
         
-        
+        $del = DB_DataObject::factory('cms_template');
+        $del->whereAddIn('!id', $ids, 'int');
+        $del->view_name = $base;
+        $del->whereAddIn('filetype' , array( 'php', 'bjs' , 'js' ), 'string');
+        $delids = $del->fetchAll('id');
+        if ($delids) {
+            DB_DataObject::factory('core_template')->query(
+                'update core_template set is_deleted =  1 where id in('. implode(',', $delids). ')'
+            );
+        }
         
     }