From 0e0e13e420da35383d0e837a80795d8f3741544c Mon Sep 17 00:00:00 2001 From: leon Date: Wed, 2 Aug 2023 12:49:30 +0800 Subject: [PATCH] DataObjects/Core_templatestr.php --- DataObjects/Core_templatestr.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/DataObjects/Core_templatestr.php b/DataObjects/Core_templatestr.php index 79d4cb6c..8a07fa5c 100644 --- a/DataObjects/Core_templatestr.php +++ b/DataObjects/Core_templatestr.php @@ -129,10 +129,12 @@ class Pman_Core_DataObjects_Core_templatestr extends DB_DataObject if(count($deactive)) { $t = DB_DataObject::factory($this->tableName()); + // deactive the child data $t->query("UPDATE core_templatestr SET active = 0 WHERE id in (" . implode(',' ,$deactive) . ") "); + // deactive the child data $t->query("UPDATE core_templatestr SET active = 0 WHERE @@ -143,20 +145,6 @@ class Pman_Core_DataObjects_Core_templatestr extends DB_DataObject lang != '' "); } - - //deactive the child data - if (empty($deactive)) { - $deactive = array(-1); - } - $t->query("UPDATE core_templatestr - SET active = 0 - WHERE - src_id IN (". implode(',' ,$deactive) . ") - AND - template_id = {$tmpl->id} - AND - lang != '' - "); } -- 2.39.2