Project

General

Profile

Bug #24638 » 17114_v4.diff

Administrator Admin, 2011-01-19 22:08

View differences:

typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectserver.php (working copy)
/**
* Constructor
*
* @param boolean $createTemplateInstance: set to FALSE if no instance of template class needs to be created
* @return void
*/
public function __construct() {
$this->template = t3lib_div::makeInstance('template');
public function __construct($createTemplateInstance = TRUE) {
// Create an instance of template class only if necessary
// It is necessary only if extension configuration is to be displayed
if ($createTemplateInstance) {
$this->template = t3lib_div::makeInstance('template');
}
$this->globalSettings = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['em']);
}
typo3/sysext/install/Classes/Updates/Base.php (working copy)
$res = $this->checkForUpdate($explanation, $showUpdate);
return ($showUpdate != 2 || $res == TRUE);
}
/**
* This method creates an instance of a connection to the Extension Manager
* and returns it. This is used when installing an extension.
*
* @return tx_em_Connection_ExtDirectServer EM connection instance
*/
public function getExtensionManagerConnection() {
// Create an instance of language, if necessary.
// Needed in order to make the em_index work
if (!isset($GLOBALS['LANG'])) {
$GLOBALS['LANG'] = t3lib_div::makeInstance('language');
$GLOBALS['LANG']->csConvObj = t3lib_div::makeInstance('t3lib_cs');
}
// Create an instance of a connection class to the EM
$extensionManagerConnection = t3lib_div::makeInstance('tx_em_Connection_ExtDirectServer', FALSE);
// Create other instances needed by the EM connection
$extensionManagerConnection->extensionList = t3lib_div::makeInstance('tx_em_Extensions_List');
$extensionManagerConnection->extensionDetails = t3lib_div::makeInstance('tx_em_Extensions_Details');
return $extensionManagerConnection;
}
/**
* This method can be called to install extensions following all proper processes
* (e.g. installing in both extList and extList_FE, respecting priority, etc.)
*
* @param array $extensionKeys List of keys of extensions to install
* @return void
*/
protected function installExtensions($extensionKeys) {
$extensionManagerConnection = $this->getExtensionManagerConnection();
foreach ($extensionKeys as $extension) {
$extensionManagerConnection->enableExtension($extension);
}
}
}
?>
typo3/sysext/install/updates/class.tx_coreupdates_installsysexts.php (working copy)
* @return boolean whether it worked (true) or not (false)
*/
public function performUpdate(&$dbQueries, &$customMessages) {
$result = false;
$result = FALSE;
// Get extension keys that were submitted by the used to be installed and that are valid for this update wizard:
// Get extension keys that were submitted by the user to be installed and that are valid for this update wizard
if (is_array($this->pObj->INSTALL['update']['installSystemExtensions']['sysext'])) {
$extArray = array_intersect(
$this->newSystemExtensions,
array_keys($this->pObj->INSTALL['update']['installSystemExtensions']['sysext'])
);
$extList = $this->addExtToList($extArray);
if ($extList) {
$this->writeNewExtensionList($extList);
$result = true;
}
$this->installExtensions($extArray);
$result = TRUE;
}
return $result;
}
/**
* Adds extension to extension list and returns new list. If -1 is returned, an error happend.
* Does NOT check dependencies yet.
*
* @param array Extension keys to add
* @return string New list of installed extensions or -1 if error
* @deprecated since TYPO3 4.5, will be removed in TYPO3 4.7 - Should not be needed anymore. Extensions should be installed directly by calling Tx_Install_Updates_Base::installExtensions()
*/
function addExtToList(array $extKeys) {
t3lib_div::logDeprecatedFunction();
// Get list of installed extensions and add this one.
$tmpLoadedExt = $GLOBALS['TYPO3_LOADED_EXT'];
if (isset($tmpLoadedExt['_CACHEFILE'])) {
......
*
* @param string List of extensions
* @return void
* @deprecated since TYPO3 4.5, will be removed in TYPO3 4.7 - Use Tx_Install_Updates_Base::installExtensions() instead
*/
protected function writeNewExtensionList($newExtList) {
protected function writeNewExtensionList($newExtList) {
t3lib_div::logDeprecatedFunction();
// Instance of install tool
$instObj = new t3lib_install;
$instObj->allowUpdateLocalConf = 1;
typo3/sysext/install/updates/class.tx_coreupdates_installnewsysexts.php (working copy)
* @return boolean whether it worked (true) or not (false)
*/
public function performUpdate(&$dbQueries, &$customMessages) {
$result = false;
$result = FALSE;
// Get extension keys that were submitted by the used to be installed and that are valid for this update wizard:
// Get extension keys that were submitted by the user to be installed and that are valid for this update wizard
if (is_array($this->pObj->INSTALL['update']['installNewSystemExtensions']['sysext'])) {
$extArray = array_intersect(
$this->newSystemExtensions,
array_keys($this->pObj->INSTALL['update']['installNewSystemExtensions']['sysext'])
);
$extList = $this->addExtToList($extArray);
if ($extList) {
$this->writeNewExtensionList($extList);
$result = true;
}
$this->installExtensions($extArray);
$result = TRUE;
}
return $result;
......
*
* @param array Extension keys to add
* @return string New list of installed extensions or -1 if error
* @deprecated since TYPO3 4.5, will be removed in TYPO3 4.7 - Should not be needed anymore. Extensions should be installed directly by calling Tx_Install_Updates_Base::installExtensions()
*/
function addExtToList(array $extKeys) {
t3lib_div::logDeprecatedFunction();
// Get list of installed extensions and add this one.
$tmpLoadedExt = $GLOBALS['TYPO3_LOADED_EXT'];
if (isset($tmpLoadedExt['_CACHEFILE'])) {
......
*
* @param string List of extensions
* @return void
* @deprecated since TYPO3 4.5, will be removed in TYPO3 4.7 - Use Tx_Install_Updates_Base::installExtensions() instead
*/
protected function writeNewExtensionList($newExtList) {
protected function writeNewExtensionList($newExtList) {
t3lib_div::logDeprecatedFunction();
// Instance of install tool
$instObj = new t3lib_install;
$instObj->allowUpdateLocalConf = 1;
(2-2/3)