english/administrator/components/com_installer/models/install.php
/**
	 * Install an extension from a directory
	 *
	 * @return	Package details or false on failure
	 * @since	1.5
	 */
Install an extension from a directory
@return      Package details or false on failure
@since       1.5
Install an extension from a directory @return Package details or false on failure @since 1 . 5
protected function _getPackageFromFolder()
	{
		$p_dir = JRequest::getString('install_directory');
		$p_dir = JPath::clean($p_dir);
				if (!is_dir($p_dir)) {
			JError::raiseWarning('', JText::_('COM_INSTALLER_MSG_INSTALL_PLEASE_ENTER_A_PACKAGE_DIRECTORY'));
			return false;
		}
		$type = JInstallerHelper::detectType($p_dir);
				if (!$type) {
			JError::raiseWarning('', JText::_('COM_INSTALLER_MSG_INSTALL_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'));
			return false;
		}
		$package['packagefile'] = null;
		$package['extractdir'] = null;
		$package['dir'] = $p_dir;
		$package['type'] = $type;
		return $package;
	}
protected function _getPackageFromFolder ( ) { $ p_dir = JRequest :: getString ( 'install_directory' ) ; $ p_dir = JPath :: clean ( $ p_dir ) ; if ( ! is_dir ( $ p_dir ) ) { JError :: raiseWarning ( '' , JText :: _ ( 'COM_INSTALLER_MSG_INSTALL_PLEASE_ENTER_A_PACKAGE_DIRECTORY' ) ) ; return false ; } $ type = JInstallerHelper :: detectType ( $ p_dir ) ; if ( ! $ type ) { JError :: raiseWarning ( '' , JText :: _ ( 'COM_INSTALLER_MSG_INSTALL_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE' ) ) ; return false ; } $ package [ 'packagefile' ] = null ; $ package [ 'extractdir' ] = null ; $ package [ 'dir' ] = $ p_dir ; $ package [ 'type' ] = $ type ; return $ package ; }
Install an extension from a directory
 @return      Package details or false on failure
 @since       1.5
Install an extension from a directory @return Package details or false on failure @since 1 . 5
// Get the path to the package to install // Did you give us a valid directory?
 // Detect the package type // Did you give us a valid package?
