From 16738920268f50813b4dbdafdc619b4ec8a2d9f2 Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 20 Sep 2005 22:04:57 +0000 Subject: - update: upgrade from 1.4.0 or 1.4.1. Upgrade from 1.3.x is not available anymore. - update: README files updated for very near branch 1.5 :-) - new: file tools/config_local.inc.php as example for optional include/config_local.inc.php - bug fixed: configuration parameter show_picture_name_on_title was useless git-svn-id: http://piwigo.org/svn/trunk@870 68402e56-0260-453c-a942-63ccdbb3a9ee --- install/upgrade_1.3.1.php | 363 ---------------------------------------------- 1 file changed, 363 deletions(-) delete mode 100644 install/upgrade_1.3.1.php (limited to 'install/upgrade_1.3.1.php') diff --git a/install/upgrade_1.3.1.php b/install/upgrade_1.3.1.php deleted file mode 100644 index 0e130a19d..000000000 --- a/install/upgrade_1.3.1.php +++ /dev/null @@ -1,363 +0,0 @@ -['.get_elapsed_time($last_time, $new_time).']'; -echo ' Basic database structure upgrade done'; -flush(); -$last_time = $new_time; - -execute_sqlfile(PHPWG_ROOT_PATH.'install/config.sql', - 'phpwebgallery_', - PREFIX_TABLE); - -$queries = array( - " -UPDATE phpwebgallery_config - SET value = '".$save['prefix_thumbnail']."' - WHERE param = 'prefix_thumbnail' -;", - - " -UPDATE phpwebgallery_config - SET value = '".$save['mail_webmaster']."' - WHERE param = 'mail_webmaster' -;" - ); - -foreach ($queries as $query) -{ - $query = str_replace('phpwebgallery_', PREFIX_TABLE, $query); - pwg_query($query); -} - -$new_time = get_moment(); -echo '
['.get_elapsed_time($last_time, $new_time).']';
-echo ' Saved configuration information restored
'; -flush(); -$last_time = $new_time; - -ordering(); -update_global_rank(); -update_category(); - -$new_time = get_moment(); -echo '
['.get_elapsed_time($last_time, $new_time).']';
-echo ' Calculated data updated (categories.rank, categories.global_rank,
-categories.date_last, categories.representative_picture_id,
-categories.nb_images)
'; -flush(); -$last_time = $new_time; - -// update calculated field "images.path" -$cat_ids = array(); - -$query = ' -SELECT DISTINCT(storage_category_id) AS unique_storage_category_id - FROM '.IMAGES_TABLE.' -;'; -$result = pwg_query($query); -while ($row = mysql_fetch_array($result)) -{ - array_push($cat_ids, $row['unique_storage_category_id']); -} -$fulldirs = get_fulldirs($cat_ids); - -foreach ($cat_ids as $cat_id) -{ - $query = ' -UPDATE '.IMAGES_TABLE.' - SET path = CONCAT(\''.$fulldirs[$cat_id].'\',\'/\',file) - WHERE storage_category_id = '.$cat_id.' -;'; - pwg_query($query); -} - -$new_time = get_moment(); -echo '
['.get_elapsed_time($last_time, $new_time).']';
-echo ' new column images.path filled
'; -flush(); -$last_time = $new_time; - -// all sub-categories of private categories become private -$cat_ids = array(); - -$query = ' -SELECT id - FROM '.CATEGORIES_TABLE.' - WHERE status = \'private\' -;'; -$result = pwg_query($query); -while ($row = mysql_fetch_array($result)) -{ - array_push($cat_ids, $row['id']); -} - -if (count($cat_ids) > 0) -{ - $privates = get_subcat_ids($cat_ids); - - $query = ' -UPDATE '.CATEGORIES_TABLE.' - SET status = \'private\' - WHERE id IN ('.implode(',', $privates).') -;'; - pwg_query($query); -} - -$new_time = get_moment(); -echo '
['.get_elapsed_time($last_time, $new_time).']';
-echo ' all sub-categories of private categories become private
'; -flush(); -$last_time = $new_time; - -$infos = array( - 'user permissions and group permissions have been erased', - - 'only thumbnails prefix and webmaster mail address have been saved from -previous configuration', - - 'in include/mysql.inc.php, before -
?>
-insert -
define(\'PHPWG_INSTALLED\', true);
'
-  
-  );
-
-?>
\ No newline at end of file
-- 
cgit v1.2.3