From d72a949281a3c496fb688cee9abd32609ce2a790 Mon Sep 17 00:00:00 2001 From: markusfluer Date: Tue, 19 Dec 2017 17:38:54 +0100 Subject: [PATCH] Fixed issue #13021: Tutorial - Click on the previous button (the sidebar) --- application/config/version.php | 2 +- application/helpers/update/updatedb_helper.php | 18 ++++++++++++++++++ installer/create-database.php | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/application/config/version.php b/application/config/version.php index 1be930f5942..e6347002116 100644 --- a/application/config/version.php +++ b/application/config/version.php @@ -14,7 +14,7 @@ $config['versionnumber'] = '3.0.0-RC.3'; //The current version of this branch $config['masterversion'] = '2.67.3'; //The current masters version merged into this branch -$config['dbversionnumber'] = 334; +$config['dbversionnumber'] = 335; $config['buildnumber'] = ''; $config['updatable'] = true; $config['assetsversionnumber'] = '3020'; diff --git a/application/helpers/update/updatedb_helper.php b/application/helpers/update/updatedb_helper.php index 7ab1d91d994..4a124fc89ef 100644 --- a/application/helpers/update/updatedb_helper.php +++ b/application/helpers/update/updatedb_helper.php @@ -776,6 +776,24 @@ function db_upgrade_all($iOldDBVersion, $bSilent = false) $oTransaction->commit(); } + if ($iOldDBVersion < 335) { + $oTransaction = $oDB->beginTransaction(); + $oDB->createCommand()->update( '{{tutorial_entries}}', [ + 'settings' => json_encode(array( + 'path' => ['/admin/survey/sa/view', ['surveyid' => '[0-9]{4,25}']], + 'element' => '#sidebar', + 'placement' => 'right', + 'redirect' => false, + 'prev' => '-1', + 'onShow' => "(function(tour){ + return Promise.resolve(tour); + })" + )) + ], 'teid=9'); + $oDB->createCommand()->update('{{settings_global}}', array('stg_value'=>335), "stg_name='DBVersion'"); + $oTransaction->commit(); + } + } catch (Exception $e) { Yii::app()->setConfig('Updating', false); $oTransaction->rollback(); diff --git a/installer/create-database.php b/installer/create-database.php index d625da5a621..31316a5b872 100644 --- a/installer/create-database.php +++ b/installer/create-database.php @@ -989,6 +989,7 @@ function createDatabase($oDB){ 'element' => '#sidebar', 'placement' => 'right', 'redirect' => false, + 'prev' => '-1', 'onShow' => "(function(tour){ return Promise.resolve(tour); })"