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 --- upgrade.php | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'upgrade.php') diff --git a/upgrade.php b/upgrade.php index 35492b74f..68878f11e 100644 --- a/upgrade.php +++ b/upgrade.php @@ -25,7 +25,6 @@ // | USA. | // +-----------------------------------------------------------------------+ -define('IN_UPGRADE', true); define('PHPWG_ROOT_PATH', './'); include_once(PHPWG_ROOT_PATH.'include/functions.inc.php'); @@ -34,17 +33,20 @@ include(PHPWG_ROOT_PATH.'include/template.php'); include(PHPWG_ROOT_PATH.'include/mysql.inc.php'); // Is PhpWebGallery already installed ? -if (defined('PHPWG_INSTALLED')) +if (!defined('PHPWG_IN_UPGRADE') or !PHPWG_IN_UPGRADE) { - $message = 'PhpWebGallery is already installed. In include/mysql.inc.php, -remove line + $message = 'PhpWebGallery is not in upgrade mode. In include/mysql.inc.php, +insert line
-define(\'PHPWG_INSTALLED\', true);
+define(\'PHPWG_IN_UPGRADE\', true);
 
if you want to upgrade'; die($message); } +// concerning upgrade, we use the default users table +$conf['users_table'] = $prefixeTable.'users'; + include_once(PHPWG_ROOT_PATH.'include/constants.php'); define('PREFIX_TABLE', $prefixeTable); @@ -113,9 +115,11 @@ function execute_sqlfile($filepath, $replaced, $replacing) // +-----------------------------------------------------------------------+ // | template initialization | // +-----------------------------------------------------------------------+ -$template = setup_style('default'); + +$template = new Template(PHPWG_ROOT_PATH.'template/yoga'); $template->set_filenames(array('upgrade'=>'upgrade.tpl')); $template->assign_vars(array('RELEASE'=>PHPWG_VERSION)); + // +-----------------------------------------------------------------------+ // | versions upgradable | // +-----------------------------------------------------------------------+ @@ -178,7 +182,16 @@ else array_push( $infos, '[security] delete files "upgrade.php", "install.php" and "install" -directory'); +directory' + ); + + array_push( + $infos, + 'in include/mysql.inc.php, remove +
+define(\'PHPWG_IN_UPGRADE\', true);
+
' + ); $template->assign_block_vars('upgrade.infos', array()); -- cgit v1.2.3