From c64da384ea354a194cfdcbd552340261b5d547d9 Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 20 Apr 2006 19:31:12 +0000 Subject: partial merge -r1173:1174 from branch-1_6 to trunk: new configuration parameter die_on_sql_error (upgrade.php and install/upgrade_*.php not concerned on BSF) partial merge -r1208:1209 from branch-1_6 to trunk (only bug fix on incorrect insertion of complex upgrade identifiers) deletions: upgrade.php and all install/upgrade_*.php because these script are never up to date on BSF. Anyway, they are only required on a stable branch. git-svn-id: http://piwigo.org/svn/trunk@1221 68402e56-0260-453c-a942-63ccdbb3a9ee --- install/upgrade_1.4.0.php | 302 ---------------------------------------------- 1 file changed, 302 deletions(-) delete mode 100644 install/upgrade_1.4.0.php (limited to 'install/upgrade_1.4.0.php') diff --git a/install/upgrade_1.4.0.php b/install/upgrade_1.4.0.php deleted file mode 100644 index a5f8f38c6..000000000 --- a/install/upgrade_1.4.0.php +++ /dev/null @@ -1,302 +0,0 @@ -['.get_elapsed_time($last_time, $new_time).']'; -echo ' Basic database structure upgrade done'; -flush(); -$last_time = $new_time; - -// user datas migration from phpwebgallery_users to phpwebgallery_user_infos -$query = ' -SELECT * - FROM '.USERS_TABLE.' -;'; - -$datas = array(); -list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();')); - -$result = pwg_query($query); -while ($row = mysql_fetch_array($result)) -{ - $row['user_id'] = $row['id']; - $row['registration_date'] = $dbnow; - array_push($datas, $row); -} - -include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); -mass_inserts( - USER_INFOS_TABLE, - array( - 'user_id', - 'nb_image_line', - 'nb_line_page', - 'status', - 'language', - 'maxwidth', - 'maxheight', - 'expand', - 'show_nb_comments', - 'recent_period', - 'template', - 'registration_date' - ), - $datas - ); - -$queries = array( - - " -UPDATE ".USER_INFOS_TABLE." - SET template = 'yoga' -;", - - " -UPDATE ".USER_INFOS_TABLE." - SET language = 'en_UK.iso-8859-1' - WHERE language NOT IN ('en_UK.iso-8859-1', 'fr_FR.iso-8859-1') -;", - - " -UPDATE ".CONFIG_TABLE." - SET value = 'en_UK.iso-8859-1' - WHERE param = 'default_language' - AND value NOT IN ('en_UK.iso-8859-1', 'fr_FR.iso-8859-1') -;", - - " -UPDATE ".CONFIG_TABLE." - SET value = 'yoga' - WHERE param = 'default_template' -;", - - " -INSERT INTO ".CONFIG_TABLE." - (param,value,comment) - VALUES - ( - 'gallery_title', - 'PhpWebGallery demonstration site', - 'Title at top of each page and for RSS feed' - ) -;", - - " -INSERT INTO ".CONFIG_TABLE." - (param,value,comment) - VALUES - ( - 'gallery_description', - 'My photos web site', - 'Short description displayed with gallery title' - ) -;" - - ); - -foreach ($queries as $query) -{ - $query = str_replace('phpwebgallery_', PREFIX_TABLE, $query); - pwg_query($query); -} - -$infos = array(); - -if ($prefix_thumbnail != 'TN-') -{ - array_push( - $infos, - 'the thumbnail prefix configuration parameter was moved to configuration -file, copy config_local.inc.php from "tools" directory to "include" directory -and edit $conf[\'prefix_thumbnail\'] = '.$prefix_thumbnail - ); -} - -?> \ No newline at end of file -- cgit v1.2.3