X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=I18n.php;h=6536b2f44e818249485c8f8343c6b82a736ff1aa;hp=5f70c7a45e298b7cc84bdcb76c53c96e4d3331d9;hb=HEAD;hpb=798fe6cb166850e238b51e66a7158748ecd452d7 diff --git a/I18n.php b/I18n.php index 5f70c7a4..bab0b2d3 100644 --- a/I18n.php +++ b/I18n.php @@ -62,7 +62,7 @@ class Pman_Core_I18n extends Pman //return true; $au = $this->getAuthUser(); //if (!$au) { - // $this->jerr("Not authenticated", array('authFailure' => true)); + // $this->jerror("LOGIN-NOAUTH", "Not authenticated", array('authFailure' => true)); //} $this->authUser = $au; @@ -86,8 +86,7 @@ class Pman_Core_I18n extends Pman $this->sessionState(0); $lang = !$this->authUser || empty($this->authUser->lang ) ? 'en' : $this->authUser->lang; - - /// verify the selected language.. + /// verify the selected language.. $i = DB_DataObject::Factory('I18n'); $i->ltype = 'l'; // string(1) not_null multiple_key $i->lkey = $lang; // string(8) not_null @@ -235,7 +234,13 @@ class Pman_Core_I18n extends Pman if (empty($k)) { return '??'; } - $fo = &PEAR::getStaticProperty('HTML_Template_Flexy','options'); + + if(class_exists('HTML_FlexyFramework2', false)) { + $fo = HTML_FlexyFramework2::get()->HTML_Template_Flexy; + } + else { + $fo = &PEAR::getStaticProperty('HTML_Template_Flexy','options'); + } $fallback_lang = empty($fo['locale']) ? 'en' : $fo['locale'];