projects
/
Pman.Cms
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59c1358
)
DataObjects/Cms_templatestr.php
author
Alan
<alan@roojs.com>
Fri, 25 Nov 2022 07:18:22 +0000
(15:18 +0800)
committer
Alan
<alan@roojs.com>
Fri, 25 Nov 2022 07:18:22 +0000
(15:18 +0800)
DataObjects/Cms_templatestr.php
patch
|
blob
|
history
diff --git
a/DataObjects/Cms_templatestr.php
b/DataObjects/Cms_templatestr.php
index
7f79fd9
..
2ce27cd
100644
(file)
--- a/
DataObjects/Cms_templatestr.php
+++ b/
DataObjects/Cms_templatestr.php
@@
-136,7
+136,20
@@
class Pman_Cms_DataObjects_Cms_templatestr extends DB_DataObject
$x->selectAdd('distinct(lang) as lang');
$x->whereAdd("lang != ''");
$ret= array();
+ $got = array();
foreach( $x->fetchAll('lang') as $l) {
+
+ $ret[] = array(
+ 'text'=>$l,
+ 'id' =>$l,
+ 'language' => true
+ );
+ $got[] = $l;
+ }
+ foreach($defaults as $l) {
+ if (in_array($l,$got)) {
+ continue;
+ }
$ret[] = array(
'text'=>$l,
'id' =>$l,