From ab895b513acb438ab85cdf548d560a696c3a81e1 Mon Sep 17 00:00:00 2001 From: louis Date: Fri, 31 Jul 2015 10:13:00 +0200 Subject: [PATCH] Fixed issue: #9802 No success message for update Dev : adding step4b inside the new comfortupdater controller for updates from old versions. --- application/controllers/admin/update.php | 12 +++++- application/models/UpdateForm.php | 2 +- .../update/updater/steps/_old_step4b.php | 42 +++++++++++++++++++ 3 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 application/views/admin/update/updater/steps/_old_step4b.php diff --git a/application/controllers/admin/update.php b/application/controllers/admin/update.php index 5e42c441861..0a1f3b33a2e 100755 --- a/application/controllers/admin/update.php +++ b/application/controllers/admin/update.php @@ -395,7 +395,7 @@ public function submitkey() /** * Update database */ - function db($continue = null) + public function db($continue = null) { Yii::app()->loadHelper("update/update"); if(isset($continue) && $continue=="yes") @@ -415,6 +415,16 @@ function db($continue = null) $this->_renderWrappedTemplate('update', $aViewUrls, $aData); } + /** + * For updates from the old updater. + */ + public function step4b() + { + if (!isset(Yii::app()->session['installlstep4b'])) die(); + $aData=Yii::app()->session['installlstep4b']; + unset (Yii::app()->session['installlstep4b']); + $this->_renderWrappedTemplate('update/updater/steps', '_old_step4b', $aData); + } /** * this function render the update buttons diff --git a/application/models/UpdateForm.php b/application/models/UpdateForm.php index eb6e0d594cf..993e0540e86 100644 --- a/application/models/UpdateForm.php +++ b/application/models/UpdateForm.php @@ -108,7 +108,7 @@ public function checkUpdateKeyonServer($submittedUpdateKey) /** * create or update the updatekey to the submited value * @param string $submittedUpdateKey the new key id - * @return SettingGlobal the new update key if success, CActiveRecord result if error + * @return array the new update key if success, CActiveRecord result if error * * TODO : should return same status than server to use the same view render */ diff --git a/application/views/admin/update/updater/steps/_old_step4b.php b/application/views/admin/update/updater/steps/_old_step4b.php new file mode 100644 index 00000000000..c61d9bdd198 --- /dev/null +++ b/application/views/admin/update/updater/steps/_old_step4b.php @@ -0,0 +1,42 @@ + +
+ + +

+session['updateinfo'])) +{ + eT('On requesting the update information from limesurvey.org there has been an error:').'
'; + if ($updateinfo['error']==1) + { + eT('Your update key is invalid and was removed. ').'
'; + } + else + eT('On requesting the update information from limesurvey.org there has been an error:').'
'; +} + +if ($new_files) +{ + eT('New files were successfully installed.'); +} +else +{ + eT('There was a problem downloading the update file. Please try to restart the update process.'); +} +?> +
+session['updateinfo']['toversion']).'
'; + eT('The update is now complete!'); ?>

+