public function actionIndex() { /* $model=new LoginForm; // if it is ajax validation request if(isset($_POST['ajax']) && $_POST['ajax']==='login-form') { echo CActiveForm::validate($model); Yii::app()->end(); } // collect user input data if(isset($_POST['LoginForm'])) { $model->attributes=$_POST['LoginForm']; // validate user input and redirect to the previous page if valid if($model->validate() && $model->login()) $this->redirect(array("course/admin")); } // display the login form $this->render('login',array('model'=>$model));*/ //检查更新包情况 UpgradeService::getService()->checkUpgradeServer(); $this->redirect(array('/admin/setting/site')); }
#!/usr/bin/env php <?php /* * Cubi upgrade command line script * - first copy the new module source to /cubi/upgrade/modules/mod_name/ folder * - then run php /cubi/tool/upgrade.php mod_name */ if ($argc < 2) { echo "usage: php upgrade_pkg.php package_file" . PHP_EOL; exit; } $package_file = $argv[1]; include_once "../app_init.php"; if (!defined("CLI")) { exit; } include_once MODULE_PATH . "/service/UpgradeService.php"; // locate the package file if (!file_exists($package_file)) { $tmpPackageFolder = APP_HOME . "/files/packages"; $package_file = $tmpPackageFolder . "/{$package_file}"; if (!file_exists($package_file)) { echo "Cannot locate the package at {$package_file}\n"; exit; } } $upgradeSvc = new UpgradeService(); $upgradeSvc->upgradePackage($package_file);
/** * Lists all models. */ public function actionIndex() { UpgradeService::getService()->checkUpgradeServer(); // $this->redirect(array('/admin/setting/site')); $this->render('index'); }
public function actionUpgradeImplement() { $version = $_POST['version']; $arrResult = UpgradeService::getService()->upgradeImplement($version); echo json_encode($arrResult); }