From c80c62e0c900af55bde9bb16c27eda6d3c856bba Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 14 Dec 2011 17:00:55 +0800 Subject: [PATCH] I18n.php --- I18n.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/I18n.php b/I18n.php index 1d5bd685..e55f0270 100644 --- 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 - 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); + } } -- 2.39.2