Project

General

Profile

Bug #24583 ยป 17320.diff

Administrator Admin, 2011-01-26 00:24

View differences:

typo3/sysext/install/updates/class.tx_coreupdates_installnewsysexts.php (Arbeitskopie)
* @return boolean whether an update is needed (true) or not (false)
*/
public function checkForUpdate(&$description) {
$result = false;
$result = FALSE;
$description = '
<p>
Install the following system extensions that are new in TYPO3
......
</li>
';
$result = true;
$result = TRUE;
}
}
$description .= '
</ul>
';
if ($this->isWizardDone()) {
$result = FALSE;
}
return $result;
}
......
* @return boolean whether it worked (true) or not (false)
*/
public function performUpdate(&$dbQueries, &$customMessages) {
$result = FALSE;
// 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'])) {
......
array_keys($this->pObj->INSTALL['update']['installNewSystemExtensions']['sysext'])
);
$this->installExtensions($extArray);
$result = TRUE;
}
return $result;
// Never show this wizard again
$this->markWizardAsDone();
return TRUE;
}
typo3/sysext/install/updates/class.tx_coreupdates_installsysexts.php (Arbeitskopie)
* @return boolean whether an update is needed (true) or not (false)
*/
public function checkForUpdate(&$description) {
$result = false;
$result = FALSE;
$description = '
<p>
Install the following system extensions as their functionality
......
foreach($this->newSystemExtensions as $ext) {
if (!t3lib_extMgm::isLoaded($ext)) {
$result = true;
$result = TRUE;
}
}
if ($this->isWizardDone()) {
$result = FALSE;
}
return $result;
}
......
* @return boolean whether it worked (true) or not (false)
*/
public function performUpdate(&$dbQueries, &$customMessages) {
$result = FALSE;
// 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'])) {
......
array_keys($this->pObj->INSTALL['update']['installSystemExtensions']['sysext'])
);
$this->installExtensions($extArray);
$result = TRUE;
}
return $result;
// Never show this wizard again
$this->markWizardAsDone();
return TRUE;
}
/**
typo3/sysext/install/Classes/Updates/Base.php (Arbeitskopie)
}
}
/**
* Marks some wizard as being "seen" so that it not shown again.
*
* Writes the info in localconf.php
*
* @return void
*/
protected function markWizardAsDone() {
// Instance of install tool
$install = new t3lib_install;
$install->allowUpdateLocalConf = 1;
$install->updateIdentity = 'TYPO3 Upgrade Wizard';
// Get lines from localconf file
$lines = $install->writeToLocalconf_control();
$wizardClassName = get_class($this);
$install->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'INSTALL\'][\'wizardDone\'][\'' . $wizardClassName . '\']', 1);
$install->writeToLocalconf_control($lines);
}
/**
* Checks if this wizard has been "done" before
*
* @return boolean TRUE if wizard has been done before, FALSE otherwise
*/
protected function isWizardDone() {
$wizardClassName = get_class($this);
$done = FALSE;
if (isset($GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone'][$wizardClassName]) &&
$GLOBALS['TYPO3_CONF_VARS']['INSTALL']['wizardDone'][$wizardClassName]) {
$done = TRUE;
}
return $done;
}
}
?>
    (1-1/1)