applications/dashboard/models/class.importmodel.php
public function RunStep($Step = 1) {
      $Started = $this->Stat('Started');
      if($Started === NULL)
         $this->Stat('Started', microtime(TRUE), 'time');

		$Steps = $this->Steps();
      $LastStep = end(array_keys($Steps));
		if(!isset($Steps[$Step]) || $Step > $LastStep) {
			return 'COMPLETE';
		}
		if(!$this->Timer) {
			$NewTimer = TRUE;
			$this->Timer = new Gdn_Timer();
			$this->Timer->Start('');
		}

      // Run a standard step every time.
      if (isset($Steps[0])) {
         call_user_func(array($this, $Steps[0]));
      }

		$Method = $Steps[$Step];
		$Result = call_user_func(array($this, $Method));

      if ($this->GenerateSQL()) {
         $this->SaveSQL($Method);
      }

      $ElapsedTime = $this->Timer->ElapsedTime();
      $this->Stat('Time Spent on Import', $ElapsedTime, 'add');

		if(isset($NewTimer))
			$this->Timer->Finish('');

      if($Result && !array_key_exists($Step + 1, $this->Steps()))
         $this->Stat('Finished', microtime(TRUE), 'time');

		return $Result;
	}
public function RunStep($Step = 1) {
      $Started = $this->Stat('Started');
      if($Started === NULL)
         $this->Stat('Started', microtime(TRUE), 'time');

		$Steps = $this->Steps();
      $LastStep = end(array_keys($Steps));
		if(!isset($Steps[$Step]) || $Step > $LastStep) {
			return 'COMPLETE';
		}
		if(!$this->Timer) {
			$NewTimer = TRUE;
			$this->Timer = new Gdn_Timer();
			$this->Timer->Start('');
		}

      // Run a standard step every time.
      if (isset($Steps[0])) {
         call_user_func(array($this, $Steps[0]));
      }

		$Method = $Steps[$Step];
		$Result = call_user_func(array($this, $Method));

      if ($this->GenerateSQL()) {
         $this->SaveSQL($Method);
      }

      $ElapsedTime = $this->Timer->ElapsedTime();
      $this->Stat('Time Spent on Import', $ElapsedTime, 'add');

		if(isset($NewTimer))
			$this->Timer->Finish('');

      if($Result && !array_key_exists($Step + 1, $this->Steps()))
         $this->Stat('Finished', microtime(TRUE), 'time');

		return $Result;
	}
public function RunStep ( $ Step = 1 ) { $ Started = $ this -> Stat ( 'Started' ) ; if ( $ Started === NULL ) $ this -> Stat ( 'Started' , microtime ( TRUE ) , 'time' ) ; $ Steps = $ this -> Steps ( ) ; $ LastStep = end ( array_keys ( $ Steps ) ) ; if ( ! isset ( $ Steps [ $ Step ] ) || $ Step > $ LastStep ) { return 'COMPLETE' ; } if ( ! $ this -> Timer ) { $ NewTimer = TRUE ; $ this -> Timer = new Gdn_Timer ( ) ; $ this -> Timer -> Start ( '' ) ; } // Run a standard step every time.
 if ( isset ( $ Steps [ 0 ] ) ) { call_user_func ( array ( $ this , $ Steps [ 0 ] ) ) ; } $ Method = $ Steps [ $ Step ] ; $ Result = call_user_func ( array ( $ this , $ Method ) ) ; if ( $ this -> GenerateSQL ( ) ) { $ this -> SaveSQL ( $ Method ) ; } $ ElapsedTime = $ this -> Timer -> ElapsedTime ( ) ; $ this -> Stat ( 'Time Spent on Import' , $ ElapsedTime , 'add' ) ; if ( isset ( $ NewTimer ) ) $ this -> Timer -> Finish ( '' ) ; if ( $ Result && ! array_key_exists ( $ Step + 1 , $ this -> Steps ( ) ) ) $ this -> Stat ( 'Finished' , microtime ( TRUE ) , 'time' ) ; return $ Result ; }
Run the step in the import.
@param int $Step the step to run.
@return mixed Whether the step succeeded or an array of information.
Run the step in the import .