From 5b9b6ed09afecf72d2ef120c30e5e15d4dcf0be7 Mon Sep 17 00:00:00 2001 From: Evie Embrechts Date: Fri, 27 Jul 2007 11:57:47 +0200 Subject: [PATCH] [svn r12776] function upgrade_16x_to_180($values) upgrades main, tracking, user databases --- main/install/upgrade_lib.php | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/main/install/upgrade_lib.php b/main/install/upgrade_lib.php index 7c6c736019..e3c89c197d 100644 --- a/main/install/upgrade_lib.php +++ b/main/install/upgrade_lib.php @@ -65,12 +65,32 @@ function upgrade_16x_to_180($values) } //STATS database section - //Get the list of queries to upgrade the statistics database - $statistics_query_list = get_sql_file_contents('migrate-db-1.6.x-1.8.0-pre.sql','stats'); + //Get the list of queries to upgrade the statistics/tracking database + $statistic_query_list = get_sql_file_contents('migrate-db-1.6.x-1.8.0-pre.sql','stats'); + if(count($statistic_query_list)>0) + { + $statistic_database = $values['database_tracking']; + mysql_select_db($statistic_database); + + foreach($statistic_query_list as $this_query) + { + mysql_query($this_query); + } + } //USER database section //Get the list of queries to upgrade the user database $user_query_list = get_sql_file_contents('migrate-db-1.6.x-1.8.0-pre.sql','user'); + if(count($user_query_list)>0) + { + $user_database = $values['database_user']; + mysql_select_db($user_database); + + foreach($user_query_list as $this_query) + { + mysql_query($this_query); + } + } /* COURSE SECTION