aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-01-08 23:56:59 +0000
committerplegall <plg@piwigo.org>2005-01-08 23:56:59 +0000
commitd2b451ed59ea06760ae22bf9a52d5e564e314fe0 (patch)
treeed2bb95ccf529c2946452b6bc2ed8412d0dd6509
parent34354aa6a950ee92a1b7b3928bcfa766065dfef9 (diff)
- in install.php, use the temporary variable $prefixeTable for inclusion of
file include/constants.php - security check in upgrade.php : no upgrade possible if constant PHPWG_INSTALLED is defined git-svn-id: http://piwigo.org/svn/trunk@682 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--install.php1
-rw-r--r--upgrade.php13
2 files changed, 14 insertions, 0 deletions
diff --git a/install.php b/install.php
index a4e21df62..779fe279f 100644
--- a/install.php
+++ b/install.php
@@ -185,6 +185,7 @@ if (@file_exists($config_file))
}
}
+$prefixeTable = $table_prefix;
include(PHPWG_ROOT_PATH . 'include/constants.php');
include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
include(PHPWG_ROOT_PATH . 'include/template.php');
diff --git a/upgrade.php b/upgrade.php
index afd0fe34f..35492b74f 100644
--- a/upgrade.php
+++ b/upgrade.php
@@ -31,7 +31,20 @@ define('PHPWG_ROOT_PATH', './');
include_once(PHPWG_ROOT_PATH.'include/functions.inc.php');
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
include(PHPWG_ROOT_PATH.'include/template.php');
+
include(PHPWG_ROOT_PATH.'include/mysql.inc.php');
+// Is PhpWebGallery already installed ?
+if (defined('PHPWG_INSTALLED'))
+{
+ $message = 'PhpWebGallery is already installed. In include/mysql.inc.php,
+remove line
+<pre style="background-color:lightgray">
+define(\'PHPWG_INSTALLED\', true);
+</pre>
+if you want to upgrade';
+ die($message);
+}
+
include_once(PHPWG_ROOT_PATH.'include/constants.php');
define('PREFIX_TABLE', $prefixeTable);