From 0d5216267cc3c647596cf3ee7288e21b40fe6586 Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 28 Mar 2007 22:06:13 +0000 Subject: New: release upgrade scripts from 1.3.0 come back from branch 1.6. Only install/upgrade_1.6.2.php is really new, upgrade 60 was taken into account. Detection of 1.6.0 or 1.6.2 data model in upgrade.php. Release upgrade scripts added on trunk to be kept in a safer place. git-svn-id: http://piwigo.org/svn/trunk@1927 68402e56-0260-453c-a942-63ccdbb3a9ee --- install/upgrade_1.6.2.php | 350 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 350 insertions(+) create mode 100644 install/upgrade_1.6.2.php (limited to 'install/upgrade_1.6.2.php') diff --git a/install/upgrade_1.6.2.php b/install/upgrade_1.6.2.php new file mode 100644 index 000000000..44c479cfa --- /dev/null +++ b/install/upgrade_1.6.2.php @@ -0,0 +1,350 @@ +'), + array('&', '&') // <- this must be the last one + ); + +foreach ($replacements as $replacement) +{ + $query = ' +UPDATE '.PREFIX_TABLE.'comments + SET content = REPLACE(content, "'. + addslashes($replacement[0]). + '", "'. + addslashes($replacement[1]). + '") +;'; + pwg_query($query); +} + +load_conf_from_db(); + +$query = " +UPDATE ".USER_INFOS_TABLE." +SET + template = '".$conf['default_template']."', + nb_image_line = ".$conf['nb_image_line'].", + nb_line_page = ".$conf['nb_line_page'].", + language = '".$conf['default_language']."', + maxwidth = ". + (empty($conf['default_maxwidth']) ? "NULL" : $conf['default_maxwidth']). + ", + maxheight = ". + (empty($conf['default_maxheight']) ? "NULL" : $conf['default_maxheight']). + ", + recent_period = ".$conf['recent_period'].", + expand = '".boolean_to_string($conf['auto_expand'])."', + show_nb_comments = '".boolean_to_string($conf['show_nb_comments'])."', + show_nb_hits = '".boolean_to_string($conf['show_nb_hits'])."', + enabled_high = '".boolean_to_string( + (isset($conf['newuser_default_enabled_high']) ? + $conf['newuser_default_enabled_high'] : true) + ). + "' +WHERE + user_id = ".$conf['default_user_id'].";"; +pwg_query($query); + +$query = " +DELETE FROM ".CONFIG_TABLE." +WHERE + param IN +( + 'default_template', + 'nb_image_line', + 'nb_line_page', + 'default_language', + 'default_maxwidth', + 'default_maxheight', + 'recent_period', + 'auto_expand', + 'show_nb_comments', + 'show_nb_hits' +) +;"; +pwg_query($query); + +// now we upgrade from 1.7.0 +// include_once(PHPWG_ROOT_PATH.'install/upgrade_1.7.0.php'); +?> -- cgit v1.2.3