aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);