Skip to content

Commit

Permalink
Dev: Update tour title in new db version
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Jan 9, 2018
1 parent b05c530 commit 1757161
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/config/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@


$config['versionnumber'] = '3.0.1'; //The current version of this branch, LS3
$config['dbversionnumber'] = 339;
$config['dbversionnumber'] = 340;
$config['buildnumber'] = '';
$config['updatable'] = true;
$config['assetsversionnumber'] = '30001';
$config['assetsversionnumber'] = '30002';
return $config;
10 changes: 10 additions & 0 deletions application/helpers/update/updatedb_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,16 @@ function db_upgrade_all($iOldDBVersion, $bSilent = false)
$oTransaction->commit();
}

/**
* Rename 'First start tour' to 'Take beginner tour'.
*/
If ($iOldDBVersion < 340) {
$oTransaction = $oDB->beginTransaction();
$oDB->createCommand()->update('{{tutorials}}', array('title'=>'Take beginner tour'), "name='firstStartTour'");
$oDB->createCommand()->update('{{settings_global}}', array('stg_value'=>340), "stg_name='DBVersion'");
$oTransaction->commit();
}

} catch (Exception $e) {
Yii::app()->setConfig('Updating', false);
$oTransaction->rollback();
Expand Down

0 comments on commit 1757161

Please sign in to comment.