isBanned($userRemoteAddress)){ // echo Yii::t('frontend', 'you are banned'); // exit; // } // if( Yii::app()->detectMobileBrowser->getIsMobile() ) { ob_start('sanitize_output'); // } } function endRequest($event) { } function sanitize_output($buffer) { $buffer = trim($buffer); $srch = ''; if ( $srch !== mb_substr($buffer, 0, strlen($srch), 'utf8') ) return $buffer; Yii::import('ext.minify.lib.Minify.HTML',true); return Minify_HTML::minify($buffer); } findAll('setting_show_in_admin = 1'); if (!empty($settings)) foreach ($settings as $k) if (!defined($k->setting_name)) define($k->setting_name, $k->setting_value); $this->definePromoConstants(); Yii::app()->name = APP_NAME; //- Yii::app()->language = APP_LANG; Yii::app()->theme = Settings::getSetting(Settings::APP_THEME); } public function definePromoConstants() { $promo_services = PromoServices::model()->findAll('setting_name IS NOT NULL'); if (!empty($promo_services)) foreach ($promo_services as $promo_service) if (!defined($promo_service->setting_name)) define($promo_service->setting_name, $promo_service->price); return true; } } findAll('setting_show_in_admin = 1'); if (!empty($settings)) foreach ($settings as $k) if (!defined($k->setting_name)) define($k->setting_name, $k->setting_value); $this->definePromoConstants(); Yii::app()->name = APP_NAME; //- Yii::app()->language = APP_LANG; Yii::app()->theme = Settings::getSetting(Settings::APP_THEME); } public function definePromoConstants() { $promo_services = PromoServices::model()->findAll('setting_name IS NOT NULL'); if (!empty($promo_services)) foreach ($promo_services as $promo_service) if (!defined($promo_service->setting_name)) define($promo_service->setting_name, $promo_service->price); return true; } }

CException

CApcCache requires PHP apc extension to be loaded.