Пример #1
0
 public function actionIndex()
 {
     $this->stdout("Checking permissions\n", Console::FG_YELLOW);
     $permissions = InstallerHelper::checkPermissions();
     $ok = true;
     foreach ($permissions as $file => $result) {
         if ($result) {
             $this->stdout('[ OK ]    ', Console::FG_GREEN);
         } else {
             $this->stdout('[ Error ] ', Console::FG_RED);
         }
         $this->stdout($file);
         $this->stdout("\n");
         $ok = $ok && $result;
     }
     if (!$ok) {
         if ($this->confirm("\nSome of your files are not accessible.\nContinue at your own risk?", true)) {
             return $this->language();
         } else {
             return 1;
         }
     } else {
         return $this->language();
     }
 }
Пример #2
0
 public function actionIndex()
 {
     $minPhpVersion = version_compare(PHP_VERSION, '5.5.0') >= 0;
     $docRoot = strpos(Yii::$app->request->url, '/installer.php') === 0;
     return $this->render('index', ['file_permissions' => InstallerHelper::checkPermissions(), 'minPhpVersion' => $minPhpVersion, 'docRoot' => $docRoot]);
 }
Пример #3
0
 public function actionIndex()
 {
     return $this->render('index', ['file_permissions' => InstallerHelper::checkPermissions()]);
 }