From 3dacd81b22be44a0e9ce76b8e9a5d16faf7c6f44 Mon Sep 17 00:00:00 2001 From: Alan Date: Thu, 3 Aug 2023 15:52:50 +0800 Subject: [PATCH] fix #7755 - hide unused template strings --- UpdateBjsTemplates.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/UpdateBjsTemplates.php b/UpdateBjsTemplates.php index b4aff11..be1a92d 100644 --- a/UpdateBjsTemplates.php +++ b/UpdateBjsTemplates.php @@ -219,7 +219,16 @@ class Pman_Admin_UpdateBjsTemplates extends Pman if($this->cli){ echo "Sync tables.....\n"; } + + // deactivate all table translation + $t = DB_DataObject::factory('core_templatestr'); + $t->query( + "UPDATE core_templatestr + SET active = 0 + WHERE on_table != ''" + ); + // activate the used table translation foreach($ff->Pman_Core['DataObjects_Core_templatestr']['tables'] as $table=>$cols){ $t = DB_DataObject::factory($table); foreach($t->fetchAll() as $d) { -- 2.39.2