Skip to content

Commit

Permalink
Fixed issue #17321: Array question are not split up on mobile devices…
Browse files Browse the repository at this point in the history
… when using vanilla theme
  • Loading branch information
gabrieljenik committed Mar 8, 2022
1 parent 8c96fd9 commit aefa616
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion application/config/version.php
Expand Up @@ -12,7 +12,7 @@
*/

$config['versionnumber'] = '5.3.4';
$config['dbversionnumber'] = 484;
$config['dbversionnumber'] = 485;
$config['buildnumber'] = '';
$config['updatable'] = true;
$config['templateapiversion'] = 3;
Expand Down
2 changes: 1 addition & 1 deletion application/core/LsDefaultDataSets.php
Expand Up @@ -902,7 +902,7 @@ public static function getTemplateConfigurationData()
'sid' => null,
'gsid' => null,
'uid' => null,
'files_css' => '{"add":["css/ajaxify.css","css/theme.css","css/custom.css"]}',
'files_css' => '{"add":["css/base.css","css/theme.css","css/noTablesOnMobile.css","css/custom.css"]}',
'files_js' => '{"add":["scripts/theme.js","scripts/ajaxify.js","scripts/custom.js"]}',
'files_print_css' => '{"add":["css/print_theme.css"]}',
'options' => '{"ajaxmode":"off","brandlogo":"on","container":"on", "hideprivacyinfo": "off", "brandlogofile":"themes/survey/vanilla/files/logo.png","font":"noto", "showpopups":"1", "showclearall":"off", "questionhelptextposition":"top"}',
Expand Down
24 changes: 24 additions & 0 deletions application/helpers/update/updates/Update_485.php
@@ -0,0 +1,24 @@
<?php

namespace LimeSurvey\Helpers\Update;

/**
* Add missing noTablesOnMobile.css to vanilla configs again. It was done on 428, but the bug on LsDefaultDataSets remained
* causing problems on new installations.
*/
class Update_485 extends DatabaseUpdateBase
{
/**
* @inheritDoc
*/
public function up()
{
// Update vanilla config. This only applies to records with the previous "default" value (from LsDefaultDataSets).
$this->db->createCommand()->update(
'{{template_configuration}}',
['files_css' => '{"add":["css/base.css","css/theme.css","css/noTablesOnMobile.css","css/custom.css"]}'],
"template_name = 'vanilla' AND files_css = :default_files_css",
[':default_files_css' => '{"add":["css/ajaxify.css","css/theme.css","css/custom.css"]}']
);
}
}

0 comments on commit aefa616

Please sign in to comment.