protected function readSettingsArray() { /*$criteria = new CDbCriteria; $criteria->select = 'SettingName, SettingIdentify, SettingValue'; $criteria->order = 'SettingGroup, Rank, SID ASC'; $data = Setting::model()->findAll($criteria);*/ $sql = "SELECT * FROM {{setting}} ORDER BY setting_group, rank, setting_id ASC"; $data = $this->db->queryAll($sql); self::$__settings = array(); foreach ($data as $_k => $_v) { self::$__settings[$_v['setting_identify']] = array('setting_name' => $_v['setting_name'], 'setting_group' => $_v['setting_group'], 'setting_identify' => $_v['setting_identify'], 'setting_type' => $_v['setting_type'], 'setting_message' => $_v['setting_message'], 'setting_options' => $_v['setting_options'], 'setting_value' => $_v['setting_value'], 'is_system' => $_v['is_system'], 'is_show' => $_v['is_show'], 'rank' => $_v['rank']); } return self::$__settings; }