aboutsummaryrefslogtreecommitdiffstats
path: root/upgrade.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-09-20 22:04:57 +0000
committerplegall <plg@piwigo.org>2005-09-20 22:04:57 +0000
commit16738920268f50813b4dbdafdc619b4ec8a2d9f2 (patch)
treef0172536878a30150426aa5b4d8c2922008050b1 /upgrade.php
parent541c302c4023cc5514f6d09cc6eff1abd8543eb5 (diff)
- 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
Diffstat (limited to '')
-rw-r--r--upgrade.php27
1 files changed, 20 insertions, 7 deletions
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
<pre style="background-color:lightgray">
-define(\'PHPWG_INSTALLED\', true);
+define(\'PHPWG_IN_UPGRADE\', true);
</pre>
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
+<pre style="background-color:lightgray">
+define(\'PHPWG_IN_UPGRADE\', true);
+</pre>'
+ );
$template->assign_block_vars('upgrade.infos', array());