예제 #1
0
 /**
  * Sets the step based on a few checks
  *
  * @return	void
  */
 private function setStep()
 {
     // fetch step
     $step = isset($_GET['step']) ? (int) $_GET['step'] : 1;
     if ($step !== 1) {
         // invalid requirements, so force step 2
         if (!InstallerStep2::checkRequirements()) {
             $step = 2;
         }
     }
     // installer step class exists
     if (class_exists('InstallerStep' . $step)) {
         // isAllowed exists
         if (is_callable(array('InstallerStep' . $step, 'isAllowed'))) {
             // step is actually allowed
             if (call_user_func(array('InstallerStep' . $step, 'isAllowed'))) {
                 // step has been validated
                 $this->step = $step;
                 // step out
                 return;
             }
         }
     }
     // fallback
     $this->step = 1;
 }
예제 #2
0
파일: step_3.php 프로젝트: richsage/forkcms
 /**
  * Is this step allowed.
  *
  * @return bool
  */
 public static function isAllowed()
 {
     return InstallerStep2::isAllowed() && InstallerStep2::checkRequirements();
 }