From 718b2b0e3702fd70cf9fc9e401e1b29cc1a1e993 Mon Sep 17 00:00:00 2001 From: leon Date: Thu, 3 Aug 2023 10:37:15 +0800 Subject: [PATCH] DataObjects/Core_templatestr.php --- DataObjects/Core_templatestr.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/DataObjects/Core_templatestr.php b/DataObjects/Core_templatestr.php index 37de1dc5..e927fbad 100644 --- a/DataObjects/Core_templatestr.php +++ b/DataObjects/Core_templatestr.php @@ -106,23 +106,28 @@ class Pman_Core_DataObjects_Core_templatestr extends DB_DataObject $x->on_col = $c; $x->lang = ''; /// eg. base language.. $up = $x->find(true); - if ($up && $x->txt == $obj->$c) { + if($up) { // deactivate empty words if(empty($obj->$c)) { $deactive[] = $x->id; } - // make sure that used words are active + // activate non-empty words else { $active[] = $x->id; } - continue; - } - // skip empty words - if(empty($obj->$c)) { - continue; + if($x->txt == $obj->$c) { + continue; // skip when no change + } } + else { + // skip empty words + if(empty($obj->$c)) { + continue; + } + } + $x->active = 1; $x->src_id = 0; $x->txt = $obj->$c; -- 2.39.2