projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c029fa
)
DataObjects/Core_templatestr.php
author
leon
<leon@roojs.com>
Wed, 2 Aug 2023 09:19:45 +0000
(17:19 +0800)
committer
leon
<leon@roojs.com>
Wed, 2 Aug 2023 09:19:45 +0000
(17:19 +0800)
DataObjects/Core_templatestr.php
patch
|
blob
|
history
diff --git
a/DataObjects/Core_templatestr.php
b/DataObjects/Core_templatestr.php
index
85fa08c
..
3e2d212
100644
(file)
--- a/
DataObjects/Core_templatestr.php
+++ b/
DataObjects/Core_templatestr.php
@@
-112,6
+112,9
@@
class Pman_Core_DataObjects_Core_templatestr extends DB_DataObject
if(empty($obj->$c)) {
$deactive[] = $x->id;
}
+ else {
+ $active[] = $x->id;
+ }
}
// skip empty words
@@
-143,6
+146,17
@@
class Pman_Core_DataObjects_Core_templatestr extends DB_DataObject
lang != ''
");
}
+
+ if(count($active)) {
+ $t = DB_DataObject::factory($this->tableName());
+ $t->query("UPDATE core_templatestr
+ SET active = 1
+ WHERE
+ src_id IN (". implode(',' ,$active) . ")
+ AND
+ template_id = {$tmpl->id}
+ ");
+ }
}