public function actionVersion() { if (isset($_POST['version'])) { Yii::app()->end(Prefs::getVersion()); } Yii::app()->end('1'); }