projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49ea755
)
DataObjects/Core_templatestr.php
author
leon
<leon@roojs.com>
Thu, 3 Aug 2023 02:18:39 +0000
(10:18 +0800)
committer
leon
<leon@roojs.com>
Thu, 3 Aug 2023 02:18:39 +0000
(10:18 +0800)
DataObjects/Core_templatestr.php
patch
|
blob
|
history
diff --git
a/DataObjects/Core_templatestr.php
b/DataObjects/Core_templatestr.php
index
a21031c
..
37de1dc
100644
(file)
--- a/
DataObjects/Core_templatestr.php
+++ b/
DataObjects/Core_templatestr.php
@@
-112,6
+112,7
@@
class Pman_Core_DataObjects_Core_templatestr extends DB_DataObject
if(empty($obj->$c)) {
$deactive[] = $x->id;
}
+ // make sure that used words are active
else {
$active[] = $x->id;
}
@@
-150,10
+151,11
@@
class Pman_Core_DataObjects_Core_templatestr extends DB_DataObject
if(count($active)) {
$t = DB_DataObject::factory($this->tableName());
+ // activate the aprent data
$t->query("UPDATE core_templatestr
SET active = 1 WHERE id in (" . implode(',' ,$active) . ")
");
-
+ // deactivate the child data
$t->query("UPDATE core_templatestr
SET active = 1
WHERE