Esempio n. 1
0
 public static function getLanguage()
 {
     if (static::$language == null) {
         //check user personalization first
         $username = Qdmvc_Helper::getCurrentUserName();
         if ($username != null) {
             $tmp = new QdUserPersonalization();
             $tmp->SETRANGE('username', $username);
             $tmp->SETRANGE('active', true);
             $tmp = $tmp->GETLIST();
             if (!Qdmvc_Helper::isNullOrEmpty($tmp)) {
                 if ($tmp[0]->language != '') {
                     static::$language = $tmp[0]->language;
                     return static::$language;
                 }
             }
         }
         //check in general setup
         $tmp = QdSetup::GET();
         static::$language = $tmp->df_language;
     }
     return static::$language;
 }
Esempio n. 2
0
 function __construct()
 {
     parent::__construct();
     $this->data['setup'] = QdSetup::GET();
 }