Skip to content

Commit

Permalink
Revert "Fixed issue: Confusing message when the ComfortUpdate server …
Browse files Browse the repository at this point in the history
…is preparing the update package"

This reverts commit 4df6868.
  • Loading branch information
c-schmitz committed Nov 13, 2021
1 parent 4df6868 commit ae5365b
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions application/views/admin/update/updater/_error.php
Expand Up @@ -4,11 +4,12 @@
* @var obj $errorObject the object error
*/
// TODO : move to the controler
$urlNew = Yii::app()->createUrl("admin/update", array("update" => 'newKey', 'destinationBuild' => $_REQUEST['destinationBuild']));
$urlNew = Yii::app()->createUrl("admin/update", array("update"=>'newKey', 'destinationBuild' => $_REQUEST['destinationBuild']));
// We first build the error message.
// View is right place to do this, so it's easy for further integrators to change messages.
$buttons = 0;
switch ($errorObject->error) {
switch ($errorObject->error)
{
case 'no_server_answer':
$title = gT('No server answer!');
$message = gT("We couldn't reach the server or the server didn't provide any answer. Please try again in few minutes.");
Expand Down Expand Up @@ -65,7 +66,7 @@

case 'unknown_view':
$title = gT("The server tried to call an unknown view!");
$message = gT('Is your ComfortUpdate up to date?') . ' ' . gT('Please contact the LimeSurvey team.');
$message = gT('Is your ComfortUpdate up to date?').' '.gT('Please contact the LimeSurvey team.');
$buttons = 3;
break;

Expand All @@ -77,25 +78,25 @@

case 'file_locked':
$title = gT('Update server busy');
$message = gT('The update server is currently busy. This usually happens when the update files for a new version are being prepared.') . '<br/>' . gT('Please be patient and try again in about 5 minutes.');
$message = gT('The update server is currently busy. This usually happens when the update files for a new version are being prepared.').'<br/>'.gT('Please be patient and try again in about 5 minutes.');
$buttons = 0;
break;

case 'server_error_creating_zip_update':
$title = gT('Update server busy');
$message = gT('The update server needs a bit of time to create the package for your version. Please try again in a couple minutes.');
$title = gT('Server error!');
$message = gT('An error occured while creating your update package file.').' '.gT('Please contact the LimeSurvey team.');
$buttons = 0;
break;

case 'server_error_getting_checksums':
$title = gT('Server error!');
$message = gT('An error occured while getting checksums.') . ' ' . gT('Please contact the LimeSurvey team.');
$message = gT('An error occured while getting checksums.').' '.gT('Please contact the LimeSurvey team.');
$buttons = 0;
break;

case 'cant_get_changeset':
$title = gT('Server error!');
$message = gT('An error occured while getting the changeset.') . ' ' . gT('Please contact the LimeSurvey team.');
$message = gT('An error occured while getting the changeset.').' '.gT('Please contact the LimeSurvey team.');
$buttons = 0;
break;

Expand Down Expand Up @@ -130,7 +131,7 @@

default:
$title = $errorObject->error;
$message = gT('Unknown error.') . ' ' . gT('Please contact the LimeSurvey team.');
$message = gT('Unknown error.').' '.gT('Please contact the LimeSurvey team.');
$buttons = 0;
break;
}
Expand All @@ -144,7 +145,7 @@

<div>

<?php if ($buttons == 1) : ?>
<?php if( $buttons == 1 ): ?>
<a class="btn btn-default" href="https://community.limesurvey.org/comfort-update-extension/" role="button" aria-disabled="false" target="_blank">
<?php eT("Buy a new key"); ?>
</a>
Expand All @@ -153,7 +154,7 @@
<?php eT("Enter a new key"); ?>
</a>
<?php endif; ?>
<?php if ($buttons == 3) : ?>
<?php if( $buttons == 3 ): ?>
<a class="btn btn-default" href="<?php echo Yii::app()->createUrl("admin/update/sa/managekey");?>" role="button" aria-disabled="false">
<?php eT("Enter a new key"); ?>
</a>
Expand Down

0 comments on commit ae5365b

Please sign in to comment.