Skip to content

Commit

Permalink
[fix] take updatable from config and use it, set to updatable=false
Browse files Browse the repository at this point in the history
[doc] Set build number
  • Loading branch information
Shnoulle committed Feb 18, 2016
1 parent 46c3472 commit f60bee0
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 25 deletions.
5 changes: 4 additions & 1 deletion application/config/internal.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@
'class' => "\\ls\\pluginmanager\\PluginManager",
'api' => "\\ls\\pluginmanager\\LimesurveyApi"
)
)
),
'config'=>array(
'updatable'=>false,
),
);


Expand Down
6 changes: 3 additions & 3 deletions application/config/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
*
*/

$config['versionnumber'] = "2.06+";
$config['versionnumber'] = "2.06+ lts";
$config['dbversionnumber'] = 184;
$config['buildnumber'] = '';
$config['updatable'] = true;
$config['buildnumber'] = '160129 - lts : 160218.1';
$config['updatable'] = false;

return $config;

Expand Down
9 changes: 9 additions & 0 deletions application/models/UpdateForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ public function init()
*/
public function getUpdateInfo($crosscheck="1")
{
if(!getGlobalSetting('updatable'))
{
$content = new stdClass();
$content->result = null;
$content->error = 'no_update_available_for_your_version';
$content->html = null;
return $content;
}
if( $this->build != '' )
{
$crosscheck = (int) $crosscheck;
Expand All @@ -72,6 +80,7 @@ public function getUpdateInfo($crosscheck="1")
$content->result = FALSE;
$content->error = "no_build";
}

return $content;
}

Expand Down
40 changes: 21 additions & 19 deletions application/views/admin/globalSettings_view.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -19,50 +19,52 @@
<li role="presentation" ><a data-toggle="tab" href='#security'><?php eT("Security"); ?></a></li>
<li role="presentation" ><a data-toggle="tab" href='#presentation'><?php eT("Presentation"); ?></a></li>
<li role="presentation" ><a data-toggle="tab" href='#language'><?php eT("Language"); ?></a></li>
<li role="presentation" ><a data-toggle="tab" href='#interfaces'><?php eT("Interfaces"); ?></a></li>
<li role="presentation" ><a data-toggle="tab" href='#interfaces'><?php eT("Interfaces"); ?></a></li>
<?php if($updatable){ ?>
<li role="presentation" id="updatetab" ><a data-toggle="tab" href='#updates' id="update_tab">ComfortUpdate</a></li>
<?php } ?>
</ul>

<?php echo CHtml::form(array("admin/globalsettings"), 'post', array('class'=>'form30','id'=>'frmglobalsettings','name'=>'frmglobalsettings'));?>
<div class="tab-content">
<div id="overview" class="tab-pane in active">
<?php $this->renderPartial("./global_settings/_overview", array( 'usercount'=>$usercount, 'surveycount'=>$surveycount ,'activesurveycount'=>$activesurveycount ,'deactivatedsurveys'=>$deactivatedsurveys ,'activetokens'=>$activetokens ,'deactivatedtokens'=>$deactivatedtokens)); ?>
</div>

<div id="general" class="tab-pane ">
<?php $this->renderPartial("./global_settings/_general"); ?>
</div>

<div id="email" class="tab-pane ">
<?php $this->renderPartial("./global_settings/_email"); ?>
</div>

<div id="bounce" class="tab-pane ">
<?php $this->renderPartial("./global_settings/_bounce"); ?>
</div>
</div>

<div id="security" class="tab-pane ">
<?php $this->renderPartial("./global_settings/_security"); ?>
</div>
</div>

<div id="presentation" class="tab-pane ">
<?php $this->renderPartial("./global_settings/_presentation"); ?>
</div>
</div>

<div id="language" class="tab-pane ">
<?php $this->renderPartial("./global_settings/_language", array( 'restrictToLanguages'=>$restrictToLanguages, 'allLanguages'=>$allLanguages, 'excludedLanguages'=>$excludedLanguages)); ?>
</div>
</div>

<div id="interfaces" class="tab-pane ">
<?php $this->renderPartial("./global_settings/_interfaces"); ?>
</div>

</div>
<?php if($updatable){ ?>
<div id='updates' class="tab-pane ">
<?php $this->renderPartial("./update/_updateContainer", array( "thisupdatecheckperiod"=>getGlobalSetting('updatecheckperiod'),"updatelastcheck"=>$updatelastcheck,"UpdateNotificationForBranch"=>getGlobalSetting('updatenotification'))); ?>

</div>
</div>
<?php } ?>

</div>
<input type='hidden' name='restrictToLanguages' id='restrictToLanguages' value='<?php implode(' ',$restrictToLanguages); ?>'/>
<input type='hidden' name='action' value='globalsettingssave'/>
</form>
</form>
6 changes: 4 additions & 2 deletions application/views/admin/global_settings/_overview.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php
/**
* This view generate the 'overview' tab inside global settings.
*
*
* @var int $usercount
* @var int $surveycount
* @var int $activesurveycount
* @var int $deactivatedsurveys
* @var int $activetokens
* @var int $deactivatedtokens
*
*
*/
?>

Expand Down Expand Up @@ -52,8 +52,10 @@
<?php
}
?>
<?php if(App()->getConfig('updatable')){ ?>
<p>
<?php $urlUpdate = Yii::app()->createUrl("admin/globalsettings", array("update"=>'updatebuttons')); ?>
<a href="<?php echo $urlUpdate; ?>"><?php eT('Click here to use ComfortUpdate.');?></a>
</p>
<?php } ?>

0 comments on commit f60bee0

Please sign in to comment.