english/libraries/joomla/installer/installer.php
/**
	 * Installation abort method
	 *
	 * @param   string  $msg	Abort message from the installer
	 * @param   string  $type	Package type if defined
	 *
	 * @return  boolean  True if successful
	 * @since   11.1
	 */
Installation abort method
@param   string  $msg        Abort message from the installer
@param   string  $type       Package type if defined

@return  boolean  True if successful
@since   11.1
Installation abort method @param string $msg Abort message from the installer @param string $type Package type if defined @return boolean True if successful @since 11 . 1
public function abort($msg=null, $type=null)
	{
		$retval = true;
		$step = array_pop($this->_stepStack);
		if ($msg) {
			JError::raiseWarning(100, $msg);
		}
		while ($step != null)
		{
			switch ($step['type'])
			{
				case 'file' :
					$stepval = JFile::delete($step['path']);
					break;
				case 'folder' :
					$stepval = JFolder::delete($step['path']);
					break;
				case 'query' :
					$stepval = false;
					break;
				case 'extension' :
					$db = $this->getDBO();
					$query = 'DELETE' .
							' FROM `#__extensions`' .
							' WHERE extension_id = '.(int)$step['id'];
					$db->setQuery($query);
					$stepval = $db->Query();
					break;
				default :
					if ($type && is_object($this->_adapters[$type])) {
						$method = '_rollback_'.$step['type'];
						if (method_exists($this->_adapters[$type], $method)) {
							$stepval = $this->_adapters[$type]->$method($step);
						}
					}
					else {
						$stepval = false; 
					}
					break;
			}
			if ($stepval === false) {
				$retval = false;
			}
			$step = array_pop($this->_stepStack);
		}
		$conf = JFactory::getConfig();
		$debug = $conf->get('debug');
		if ($debug) {
			JError::raiseError(500, JText::_('JLIB_INSTALLER_ABORT_DEBUG').$msg);
		}
		return $retval;
	}
public function abort ( $ msg = null , $ type = null ) { $ retval = true ; $ step = array_pop ( $ this -> _stepStack ) ; if ( $ msg ) { JError :: raiseWarning ( 100 , $ msg ) ; } while ( $ step != null ) { switch ( $ step [ 'type' ] ) { case 'file' : $ stepval = JFile :: delete ( $ step [ 'path' ] ) ; break ; case 'folder' : $ stepval = JFolder :: delete ( $ step [ 'path' ] ) ; break ; case 'query' : $ stepval = false ; break ; case 'extension' : $ db = $ this -> getDBO ( ) ; $ query = 'DELETE' . ' FROM `#__extensions`' . ' WHERE extension_id = ' . ( int ) $ step [ 'id' ] ; $ db -> setQuery ( $ query ) ; $ stepval = $ db -> Query ( ) ; break ; default : if ( $ type && is_object ( $ this -> _adapters [ $ type ] ) ) { $ method = '_rollback_' . $ step [ 'type' ] ; if ( method_exists ( $ this -> _adapters [ $ type ] , $ method ) ) { $ stepval = $ this -> _adapters [ $ type ] -> $ method ( $ step ) ; } } else { $ stepval = false ; } break ; } if ( $ stepval === false ) { $ retval = false ; } $ step = array_pop ( $ this -> _stepStack ) ; } $ conf = JFactory :: getConfig ( ) ; $ debug = $ conf -> get ( 'debug' ) ; if ( $ debug ) { JError :: raiseError ( 500 , JText :: _ ( 'JLIB_INSTALLER_ABORT_DEBUG' ) . $ msg ) ; } return $ retval ; }
Installation abort method
 @param   string  $msg        Abort message from the installer
 @param   string  $type       Package type if defined
Installation abort method @param string $msg Abort message from the installer @param string $type Package type if defined
// Initialise variables. // Raise abort warning // Remove the file // Remove the folder // Placeholder in case this is necessary in the future // $stepval is always false because if this step was called it invariably failed // Get database connector object // Remove the entry from the #__extensions table // Build the name of the custom rollback method for the type // Custom rollback method handler // set it to false // Only set the return value if it is false // Get the next step and continue