Skip to content

Commit

Permalink
Dev Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Jan 16, 2018
2 parents 5148d05 + 1422d25 commit a6bbf8c
Show file tree
Hide file tree
Showing 17 changed files with 242 additions and 184 deletions.
2 changes: 1 addition & 1 deletion application/config/updater_version.php
Expand Up @@ -15,7 +15,7 @@

// THIS FILE SHOULD NOT BE CHANGED MANUALLY !

$config['updaterversion'] = 6;
$config['updaterversion'] = 8;
$config['comfort_update_server_url'] = 'comfortupdate.limesurvey.org/';
//$config['comfort_update_server_url'] = 'web.comfortupdate.org/';
$config['comfort_update_server_ssl'] = 0;
Expand Down
4 changes: 2 additions & 2 deletions application/config/version.php
Expand Up @@ -12,9 +12,9 @@
*/


$config['versionnumber'] = '3.0.2develop'; //The current version of this branch, LS3
$config['versionnumber'] = '3.0.4develop'; //The current version of this branch, LS3
$config['dbversionnumber'] = 350;
$config['buildnumber'] = '';
$config['updatable'] = true;
$config['assetsversionnumber'] = '30003';
$config['assetsversionnumber'] = '30005';
return $config;
Expand Up @@ -20,7 +20,7 @@ var onClickListAction = function () {
var $actionUrl = $that.data('url'); // The url of the Survey Controller action to call
var onSuccess = $that.data('on-success');
var $gridid = $(this).closest('div.listActions').data('grid-id');
var $oCheckedItems = $.fn.yiiGridView.getChecked($gridid, $(this).closest('div.listActions').data('pk')); // List of the clicked checkbox
var $oCheckedItems = $gridid.yiiGridView('getChecked', $(this).closest('div.listActions').data('pk')); // List of the clicked checkbox
var $oCheckedItems = JSON.stringify($oCheckedItems);
var actionType = $that.data('actionType');

Expand All @@ -39,7 +39,7 @@ var onClickListAction = function () {
// TODO : Switch case "redirection (with 2 type; post or fill session)"
if(actionType == "redirect")
{
$oCheckedItems = $.fn.yiiGridView.getChecked($gridid, $('.listActions').data('pk')); // So we can join
$oCheckedItems = $gridid.yiiGridView('getChecked', $('.listActions').data('pk')); // So we can join
var newForm = jQuery('<form>', {
'action': $actionUrl,
'target': '_blank',
Expand Down Expand Up @@ -71,7 +71,7 @@ var onClickListAction = function () {

// Set window location href. Used by download files in responses list view.
if (actionType == 'window-location-href') {
var $oCheckedItems = $.fn.yiiGridView.getChecked($gridid, $('.listActions').data('pk')); // So we can join
var $oCheckedItems = $gridid.yiiGridView('getChecked', $('.listActions').data('pk')); // So we can join
window.location.href = $actionUrl + $oCheckedItems.join(',');
return;
}
Expand All @@ -83,7 +83,7 @@ var onClickListAction = function () {
if (actionType == 'custom') {
var js = $that.data('custom-js');
var func = eval(js);
var itemIds = $.fn.yiiGridView.getChecked($gridid, $('.listActions').data('pk'));
var itemIds = $gridid.yiiGridView('getChecked', $('.listActions').data('pk'));
func(itemIds);
return;
}
Expand Down Expand Up @@ -113,7 +113,7 @@ var onClickListAction = function () {

if ($that.data('grid-reload') == "yes")
{
$.fn.yiiGridView.update($gridid); // Update the surveys list
$gridid.yiiGridView('update'); // Update the surveys list
setTimeout(function(){
$(document).trigger("actions-updated");}, 500); // Raise an event if some widgets inside the modals need some refresh (eg: position widget in question list)
}
Expand Down
Expand Up @@ -9,7 +9,7 @@ $(document).on('ready pjax:scriptcomplete', function() {
{
jQuery(document).on("change", '#pageSize', function()
{
$.fn.yiiGridView.update('survey-grid',{ data:{ pageSize: $(this).val() }});
$('#survey-grid').yiiGridView('update',{ data:{ pageSize: $(this).val() }});
});
});
});
2 changes: 1 addition & 1 deletion application/helpers/update/updatedb_helper.php
Expand Up @@ -1073,7 +1073,7 @@ function db_upgrade_all($iOldDBVersion, $bSilent = false)
[
'extends' => 'vanilla',
],
"extends=''"
"extends = '' AND name != 'vanilla'"
);

// If vanilla template is missing, install it.
Expand Down
23 changes: 22 additions & 1 deletion application/models/Template.php
Expand Up @@ -198,11 +198,15 @@ public function checkTemplate()
// Check that extended template is installed.
$this->checkTemplateExtends();

// A template should not extend it self.
$this->checkExtendsItSelf();

return true;
}

/**
* Returns false if any of the extended templates are not installed; otherwise true.
* Throws exception if any of the extended templates are not installed; otherwise
* returns true.
* @return boolean
* @throws Exception if extended template is not installed.
*/
Expand All @@ -222,6 +226,23 @@ public function checkTemplateExtends()
return true;
}

/**
* @return boolean
* @throws Exception if name equals extends.
*/
public function checkExtendsItSelf()
{
if ($this->name == $this->extends) {
throw new Exception(
sprintf(
'Error: The template %s extends it self',
$this->name
)
);
}
return true;
}

/**
* Check if a given Template has a valid XML File
* @TODO: check api version
Expand Down
4 changes: 3 additions & 1 deletion application/models/TemplateConfiguration.php
Expand Up @@ -751,7 +751,9 @@ protected function setMotherTemplates()
{
if (!empty($this->template->extends)) {
$sMotherTemplateName = $this->template->extends;
$this->oMotherTemplate = TemplateConfiguration::getInstanceFromTemplateName($sMotherTemplateName)->prepareTemplateRendering($sMotherTemplateName, null);
$instance = TemplateConfiguration::getInstanceFromTemplateName($sMotherTemplateName);
$instance->template->checkTemplate();
$this->oMotherTemplate = $instance->prepareTemplateRendering($sMotherTemplateName, null);
}
}

Expand Down
15 changes: 6 additions & 9 deletions assets/scripts/admin/tokens.js
Expand Up @@ -227,15 +227,12 @@ $(document).on('ready pjax:scriptcomplete', function(){
url: actionUrl,
method: "GET",
success: function(data){
try{
$.fn.yiiGridView.update('token-grid', {
complete: function(s){
$modal.modal('hide');
} // Update the surveys list
});
} catch(e){
if(e){console.ls.error(e); $modal.modal('hide');}
}

$('#token-grid').yiiGridView('update',{
complete: function(s){
$modal.modal('hide');
} // Update the surveys list
});
}
});
})
Expand Down
17 changes: 17 additions & 0 deletions docs/release_notes.txt
Expand Up @@ -35,6 +35,23 @@ Thank you to everyone who helped with this new release!
CHANGE LOG
------------------------------------------------------

Changes from 3.0.3 (build 180112) to 3.0.4 (build 180116) Jan 16, 2018
-Fixed issue #13124: LDAP Authencation failed (Denis Chenu)
-Fixed issue #13139: Editing assessment rules->message text gets lost (markusfluer)
-Fixed issue #13145: Unable to process IMAP bounces (Carsten Schmitz)
-Fixed issue #13151: Display issue in survey theme editor (markusfluer)
-Fixed issue #13154: "Resume Later" fails with "General error: 1364 Field 'saved_thisstep' doesn't have a default value" (markusfluer)
-Fixed issue: Missing vanilla and fruity theme configuration after upgrading from 2.73 (Olle Haerstedt)
-Fixed issue: POST URLs on user editing (Carsten Schmitz)
-Fixed issue: ComfortUpdate ZIP problem (LouisGac)
#Updated translation: Catalan by qualitatuvic
#Updated translation: Hungarian by kkd
#Updated translation: Italian (Informal) by lfanfoni
#Updated translation: Italian by lfanfoni
#Updated translation: Norwegian (Bokmål) by pmonstad
#Updated translation: Norwegian (Nynorsk) by pmonstad
#Updated translation: Spanish (Spain) by aesteban

Changes from 3.0.2 (build 180110) to 3.0.3 (build 180112) Jan 12, 2018
-Fixed a small typo (gekkedev)
-Fixed issue #12223: Exporting database does not name columns for attributes (Matthew)
Expand Down

0 comments on commit a6bbf8c

Please sign in to comment.