english/libraries/joomla/installer/installer.php
/**
	 * Tries to find the package manifest file
	 *
	 * @return  boolean  True on success, False on error
	 * @since 1.0
	 */
Tries to find the package manifest file
@return  boolean  True on success, False on error
@since 1.0
Tries to find the package manifest file @return boolean True on success False on error @since 1 . 0
public function findManifest()
	{
		$xmlfiles = JFolder::files($this->getPath('source'), '.xml$', 1, true);
		if (!empty($xmlfiles)) {
			foreach ($xmlfiles as $file)
			{
								$manifest = $this->isManifest($file);
				if (!is_null($manifest)) {
					if ((string)$manifest->attributes()->method == 'upgrade') {
						$this->_upgrade = true;
						$this->_overwrite = true;
					}
					if ((string)$manifest->attributes()->overwrite == 'true') {
						$this->_overwrite = true;
					}
					$this->manifest = $manifest;
					$this->setPath('manifest', $file);
					$this->setPath('source', dirname($file));
					return true;
				}
			}
			JError::raiseWarning(1, JText::_('JLIB_INSTALLER_ERROR_NOTFINDJOOMLAXMLSETUPFILE'));
			return false;
		}
		else {
			JError::raiseWarning(1, JText::_('JLIB_INSTALLER_ERROR_NOTFINDXMLSETUPFILE'));
			return false;
		}
	}
public function findManifest ( ) { $ xmlfiles = JFolder :: files ( $ this -> getPath ( 'source' ) , '.xml$' , 1 , true ) ; if ( ! empty ( $ xmlfiles ) ) { foreach ( $ xmlfiles as $ file ) { $ manifest = $ this -> isManifest ( $ file ) ; if ( ! is_null ( $ manifest ) ) { if ( ( string ) $ manifest -> attributes ( ) -> method == 'upgrade' ) { $ this -> _upgrade = true ; $ this -> _overwrite = true ; } if ( ( string ) $ manifest -> attributes ( ) -> overwrite == 'true' ) { $ this -> _overwrite = true ; } $ this -> manifest = $ manifest ; $ this -> setPath ( 'manifest' , $ file ) ; $ this -> setPath ( 'source' , dirname ( $ file ) ) ; return true ; } } JError :: raiseWarning ( 1 , JText :: _ ( 'JLIB_INSTALLER_ERROR_NOTFINDJOOMLAXMLSETUPFILE' ) ) ; return false ; } else { JError :: raiseWarning ( 1 , JText :: _ ( 'JLIB_INSTALLER_ERROR_NOTFINDXMLSETUPFILE' ) ) ; return false ; } }
Tries to find the package manifest file
 @return  boolean  True on success, False on error
 @since 1.0
Tries to find the package manifest file @return boolean True on success False on error @since 1 . 0
// Get an array of all the XML files from the installation directory // If at least one XML file exists // Is it a valid Joomla installation manifest file?
 // If the root method attribute is set to upgrade, allow file overwrite // If the overwrite option is set, allow file overwriting // Set the manifest object and path // Set the installation source path to that of the manifest file // None of the xml files found were valid install files // No xml files were found in the install folder