['.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 ); } ?>