/**
* Update Core Joomla
*
* @param mixed $updatemodel Update Model
*
* @return boolean success
*
* @since 4.0.0
*/
private function updateJoomlaCore($updatemodel) : bool
{
$updateInformation = $this->updateInfo;
if (!empty($updateInformation['hasUpdate'])) {
$this->progressBar->advance();
$this->progressBar->setMessage("Processing update package ...");
$package = $this->processUpdatePackage($updateInformation);
$this->progressBar->advance();
$this->progressBar->setMessage("Finalizing update ...");
$result = $updatemodel->finaliseUpgrade();
if ($result) {
$this->progressBar->advance();
$this->progressBar->setMessage("Cleaning up ...");
// Remove the xml
if (file_exists(JPATH_BASE . '/joomla.xml')) {
File::delete(JPATH_BASE . '/joomla.xml');
}
InstallerHelper::cleanupInstall($package['file'], $package['extractdir']);
$updatemodel->purge();
return true;
}
}
return false;
}