projects
/
Pman.Admin
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
75f634c
)
fix #7755 - hide unused template strings
author
Alan
<alan@roojs.com>
Thu, 3 Aug 2023 07:52:50 +0000
(15:52 +0800)
committer
Alan
<alan@roojs.com>
Thu, 3 Aug 2023 07:52:50 +0000
(15:52 +0800)
UpdateBjsTemplates.php
patch
|
blob
|
history
diff --git
a/UpdateBjsTemplates.php
b/UpdateBjsTemplates.php
index
b4aff11
..
be1a92d
100644
(file)
--- a/
UpdateBjsTemplates.php
+++ b/
UpdateBjsTemplates.php
@@
-219,7
+219,16
@@
class Pman_Admin_UpdateBjsTemplates extends Pman
if($this->cli){
echo "Sync tables.....\n";
}
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) {
foreach($ff->Pman_Core['DataObjects_Core_templatestr']['tables'] as $table=>$cols){
$t = DB_DataObject::factory($table);
foreach($t->fetchAll() as $d) {