Skip to content

Commit

Permalink
Dev removed $clang global dependency from update*
Browse files Browse the repository at this point in the history
Dev fixed DBversion - should have been 149 for survey_url_parameters

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_ci@11087 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
TMSWhite committed Oct 3, 2011
1 parent c78f40b commit 9dbd7e6
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion application/config/version.php
@@ -1,7 +1,7 @@
<?php

$config['versionnumber'] = "2.0alpha";
$config['dbversionnumber'] = 148;
$config['dbversionnumber'] = 149;
$config['buildnumber'] = '';

?>
1 change: 1 addition & 0 deletions application/helpers/update/update_helper.php
Expand Up @@ -42,6 +42,7 @@ function CheckForDBUpgrades($subaction = null)
$tables = $connect->MetaTables();
db_upgrade_all(intval($currentDBVersion));
db_upgrade(intval($currentDBVersion));
$CI->db->update('settings_global',array('stg_value' => intval($dbversionnumber)),array('stg_name' => 'DBVersion'));
echo "<br />".sprintf($clang->gT("Database has been successfully upgraded to version %s"),$dbversionnumber);
echo "<br /><a href='".site_url("admin")."'>".$clang->gT("Back to main menu")."</a></div>";
}
Expand Down
5 changes: 3 additions & 2 deletions application/helpers/update/upgrade-all_helper.php
Expand Up @@ -20,9 +20,10 @@
function db_upgrade_all($oldversion) {
/// This function does anything necessary to upgrade
/// older versions to match current functionality
global $modifyoutput, $dbprefix, $usertemplaterootdir, $standardtemplaterootdir, $clang;
global $modifyoutput, $dbprefix, $usertemplaterootdir, $standardtemplaterootdir;
$CI =& get_instance();
$CI->load->dbforge();
$clang = $CI->limesurvey_lang;
echo str_pad($clang->gT('The LimeSurvey database is being upgraded').' ('.date('Y-m-d H:i:s').')',14096).".". $clang->gT('Please be patient...')."<br /><br />\n";

if ($oldversion < 143)
Expand Down Expand Up @@ -54,7 +55,7 @@ function db_upgrade_all($oldversion) {
closedir($myDirectory);

}
if ($oldversion < 148)
if ($oldversion < 149)
{
$CI->dbforge->add_field('id');
$fields = array(
Expand Down
4 changes: 3 additions & 1 deletion application/helpers/update/upgrade-mssql_helper.php
Expand Up @@ -20,7 +20,9 @@
function db_upgrade($oldversion) {
/// This function does anything necessary to upgrade
/// older versions to match current functionality
global $modifyoutput, $dbprefix, $clang;
global $modifyoutput, $dbprefix;
$CI =& get_instance();
$clang = $CI->limesurvey_lang;
if ($oldversion < 111) {

// Language upgrades from version 110 to 111 since the language names did change
Expand Down
4 changes: 3 additions & 1 deletion application/helpers/update/upgrade-mssqlnative_helper.php
Expand Up @@ -20,7 +20,9 @@
function db_upgrade($oldversion) {
/// This function does anything necessary to upgrade
/// older versions to match current functionality
global $modifyoutput, $dbprefix, $clang;
global $modifyoutput, $dbprefix;
$CI =& get_instance();
$clang = $CI->limesurvey_lang;
if ($oldversion < 111) {

// Language upgrades from version 110 to 111 since the language names did change
Expand Down
4 changes: 3 additions & 1 deletion application/helpers/update/upgrade-mysql_helper.php
Expand Up @@ -20,7 +20,9 @@
function db_upgrade($oldversion) {
/// This function does anything necessary to upgrade
/// older versions to match current functionality
global $modifyoutput, $databasename, $databasetabletype, $connect, $clang;
global $modifyoutput, $databasename, $databasetabletype, $connect;
$CI =& get_instance();
$clang = $CI->limesurvey_lang;
if ($oldversion < 111) {
// Language upgrades from version 110 to 111 since the language names did change

Expand Down
4 changes: 3 additions & 1 deletion application/helpers/update/upgrade-postgres_helper.php
Expand Up @@ -18,7 +18,9 @@
// For this there will be a settings table which holds the last time the database was upgraded

function db_upgrade($oldversion) {
global $modifyoutput, $databasename, $databasetabletype, $clang;
global $modifyoutput, $databasename, $databasetabletype;
$CI =& get_instance();
$clang = $CI->limesurvey_lang;


if ($oldversion < 127) {
Expand Down

0 comments on commit 9dbd7e6

Please sign in to comment.