From: Tim Otten Date: Tue, 7 May 2013 22:22:04 +0000 (-0700) Subject: CRM-12549 - Restore upgrade message X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c76e6d43e11b89728ade43d75e2942ca2b39062b;p=civicrm-core.git CRM-12549 - Restore upgrade message ---------------------------------------- * CRM-12549: Upgrade isn't displaying $message on success.tpl http://issues.civicrm.org/jira/browse/CRM-12549 --- diff --git a/CRM/Upgrade/Page/Upgrade.php b/CRM/Upgrade/Page/Upgrade.php index bdac170084..4448628496 100644 --- a/CRM/Upgrade/Page/Upgrade.php +++ b/CRM/Upgrade/Page/Upgrade.php @@ -150,6 +150,8 @@ class CRM_Upgrade_Page_Upgrade extends CRM_Core_Page { // lets drop all the triggers here CRM_Core_DAO::dropTriggers(); + $this->set('isUpgradePending', TRUE); + // Persistent message storage across upgrade steps. TODO: Use structured message store // Note: In clustered deployments, this file must be accessible by all web-workers. $this->set('postUpgradeMessageFile', CRM_Utils_File::tempnam('civicrm-post-upgrade')); @@ -174,8 +176,9 @@ class CRM_Upgrade_Page_Upgrade extends CRM_Core_Page { $upgrade = new CRM_Upgrade_Form(); $template = CRM_Core_Smarty::singleton(); - list($currentVer, $latestVer) = $upgrade->getUpgradeVersions(); - if ($currentVer != $latestVer) { + // If we're redirected from queue-runner, then isUpgradePending=true. + // If user then reloads the finish page, the isUpgradePending will be unset. (Because the session has been cleared.) + if ($this->get('isUpgradePending')) { // TODO: Use structured message store $postUpgradeMessage = file_get_contents($this->get('postUpgradeMessageFile'));