english/libraries/joomla/installer/adapters/module.php
/**
	 * Custom discover_install method
	 *
	 * @param   integer  $id The id of the extension to install
	 *
	 * @return void
	 * @since   11.1
	 */
Custom discover_install method
@param   integer  $id The id of the extension to install


Custom discover_install method @param integer $id The id of the extension to install
function discover_install()
	{
		$client = JApplicationHelper::getClientInfo($this->parent->extension->client_id);
		$manifestPath = $client->path . '/modules/' . $this->parent->extension->element . '/' . $this->parent->extension->element . '.xml';
		$this->parent->manifest = $this->parent->isManifest($manifestPath);
		$description = (string)$this->parent->manifest->description;
		if ($description) {
			$this->parent->set('message', JText::_($description));
		}
		else {
			$this->parent->set('message', '');
		}
		$this->parent->setPath('manifest', $manifestPath);
		$manifest_details = JApplicationHelper::parseXMLInstallFile($this->parent->getPath('manifest'));
				$this->parent->extension->manifest_cache = json_encode($manifest_details);
		$this->parent->extension->state = 0;
		$this->parent->extension->name = $manifest_details['name'];
		$this->parent->extension->enabled = 1;
		$this->parent->extension->params = $this->parent->getParams();
		if ($this->parent->extension->store()) {
			return $this->parent->extension->get('extension_id');
		}
		else {
			JError::raiseWarning(101, JText::_('JLIB_INSTALLER_ERROR_MOD_DISCOVER_STORE_DETAILS'));
			return false;
		}
	}
function discover_install ( ) { $ client = JApplicationHelper :: getClientInfo ( $ this -> parent -> extension -> client_id ) ; $ manifestPath = $ client -> path . '/modules/' . $ this -> parent -> extension -> element . '/' . $ this -> parent -> extension -> element . '.xml' ; $ this -> parent -> manifest = $ this -> parent -> isManifest ( $ manifestPath ) ; $ description = ( string ) $ this -> parent -> manifest -> description ; if ( $ description ) { $ this -> parent -> set ( 'message' , JText :: _ ( $ description ) ) ; } else { $ this -> parent -> set ( 'message' , '' ) ; } $ this -> parent -> setPath ( 'manifest' , $ manifestPath ) ; $ manifest_details = JApplicationHelper :: parseXMLInstallFile ( $ this -> parent -> getPath ( 'manifest' ) ) ; $ this -> parent -> extension -> manifest_cache = json_encode ( $ manifest_details ) ; $ this -> parent -> extension -> state = 0 ; $ this -> parent -> extension -> name = $ manifest_details [ 'name' ] ; $ this -> parent -> extension -> enabled = 1 ; $ this -> parent -> extension -> params = $ this -> parent -> getParams ( ) ; if ( $ this -> parent -> extension -> store ( ) ) { return $ this -> parent -> extension -> get ( 'extension_id' ) ; } else { JError :: raiseWarning ( 101 , JText :: _ ( 'JLIB_INSTALLER_ERROR_MOD_DISCOVER_STORE_DETAILS' ) ) ; return false ; } }
Custom discover_install method
 @param   integer  $id The id of the extension to install
Custom discover_install method @param integer $id The id of the extension to install
// Modules are like templates, and are one of the easiest // If its not in the extensions table we just add it // TODO: Re-evaluate this; should we run installation triggers? postflight perhaps?
