projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4e8720a
)
I18n.php
author
Alan Knowles
<alan@roojs.com>
Wed, 14 Dec 2011 09:00:55 +0000
(17:00 +0800)
committer
Alan Knowles
<alan@roojs.com>
Wed, 14 Dec 2011 09:00:55 +0000
(17:00 +0800)
I18n.php
patch
|
blob
|
history
diff --git
a/I18n.php
b/I18n.php
index
1d5bd68
..
e55f027
100644
(file)
--- a/
I18n.php
+++ b/
I18n.php
@@
-89,10
+89,15
@@
class Pman_Core_I18N extends Pman
$i = DB_DataObject::Factory('I18n');
$i->ltype = 'l'; // string(1) not_null multiple_key
$i->lkey = $lang; // string(8) not_null
$i = DB_DataObject::Factory('I18n');
$i->ltype = 'l'; // string(1) not_null multiple_key
$i->lkey = $lang; // string(8) not_null
- if (!$i->count()) {
-
-
- $this->jerr('invalid lang configured: ' . $lang);
+ if (!$i->count()) {
+ $i = DB_DataObject::Factory('I18n');
+ $i->buildDb();
+ $i = DB_DataObject::Factory('I18n');
+ $i->ltype = 'l'; // string(1) not_null multiple_key
+ $i->lkey = $lang;
+ if (!$i->count()) {
+ $this->jerr('invalid lang configured: ' . $lang);
+ }
}
}