Skip to content

Commit

Permalink
Fixed issue: LTS branch shown as unstable in ComfortUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Aug 13, 2021
1 parent c696b44 commit 0364453
Showing 1 changed file with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
?>
<?php
// First we check if the server provided a specific HTML message
if(isset($updateInfos->html))
{
if($updateInfos->html != "")
echo $updateInfos->html;
// And we unset this html message for the loop on update versions don't crush on it
unset($updateInfos->html);
if (isset($updateInfos->html)) {
if ($updateInfos->html != "") {
echo $updateInfos->html;
}
// And we unset this html message for the loop on update versions don't crush on it
unset($updateInfos->html);
}
?>

<?php if(isset($updateInfos->alert)): // First we check if the server provided a specific alert message ?>
<?php if($updateInfos->alert != ""):?>
<?php if (isset($updateInfos->alert)) : // First we check if the server provided a specific alert message ?>
<?php if ($updateInfos->alert != "") :?>
<!-- Alert from server -->
<div class="alert alert-warning" role="alert">
<?php echo $updateInfos->alert; ?>
Expand Down Expand Up @@ -54,7 +54,7 @@
</thead>

<!-- rows for each version -->
<?php foreach ($updateInfos as $aUpdateVersion):?>
<?php foreach ($updateInfos as $aUpdateVersion) :?>
<?php $aUpdateVersion = (array) $aUpdateVersion;?>
<tr>

Expand All @@ -64,30 +64,30 @@
// display infos about the update. e.g : "2.05+ (150508) (stable)"
echo $aUpdateVersion['versionnumber'];?> (<?php echo $aUpdateVersion['build'];?>)

<?php if(isset($aUpdateVersion['html'])):?>
<?php if($aUpdateVersion['html']!=''):?>
<?php if (isset($aUpdateVersion['html'])) :?>
<?php if ($aUpdateVersion['html'] != '') :?>
<?php echo $aUpdateVersion['html'];?>
<?php endif;?>
<?php endif;?>
</td>

<!-- stable / unstable -->
<?php if ($aUpdateVersion['branch']!='master'):?>
<?php if ($aUpdateVersion['branch'] != 'master' && strpos(strtolower($aUpdateVersion['branch']), 'lts') === false) :?>
<td class="text-warning">
<?php eT('unstable'); ?>
</td>
<?php else: ?>
<?php else : ?>
<td>
<?php eT('stable');?>
</td>
<?php endif;?>

<!-- security / regular -->
<?php if($aUpdateVersion['security_update']):?>
<?php if ($aUpdateVersion['security_update']) :?>
<td class="text-warning">
<?php eT("Security update");?>
</td>
<?php else: ?>
<?php else : ?>
<td>
<?php eT("Regular update");?>
</td>
Expand All @@ -96,18 +96,18 @@
<!-- button -->
<td class="text-right">
<!-- The form launching an update process. First step is the welcome message. The form is not submitted, but catch by the javascript inserted in the end of this file -->
<?php echo CHtml::beginForm(App()->createUrl('admin/update/sa/getwelcome'), 'post', array('class'=>'launchUpdateForm')); ?>
<?php echo CHtml::hiddenField('destinationBuild' , $aUpdateVersion['build']); ?>
<?php echo CHtml::beginForm(App()->createUrl('admin/update/sa/getwelcome'), 'post', array('class' => 'launchUpdateForm')); ?>
<?php echo CHtml::hiddenField('destinationBuild', $aUpdateVersion['build']); ?>

<!-- the button launching the update -->
<button type="submit" class="btn btn-default ajax_button launch_update">
<span style="height : 1em; margin-right : 0.5em;" class="icon-shield text-success"></span>
<?php eT("Use ComfortUpdate");?>
</button>

<?php if ($aUpdateVersion['branch']!='master'): ?>
<?php if ($aUpdateVersion['branch'] != 'master') : ?>
<input type='button' class="ajax_button btn btn-default" onclick="window.open('https://community.limesurvey.org/downloads/', '_blank')" value='<?php eT("Download"); ?>' />
<?php else: ?>
<?php else : ?>
<input type='button' class="ajax_button btn btn-default" onclick="window.open('https://community.limesurvey.org/downloads/', '_blank')" value='<?php eT("Download"); ?>' />
<?php endif; ?>

Expand Down

0 comments on commit 0364453

Please sign in to comment.