aboutsummaryrefslogtreecommitdiffstats
path: root/upgrade.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2007-05-04 21:56:58 +0000
committerplegall <plg@piwigo.org>2007-05-04 21:56:58 +0000
commit3ae12221acad3ea0fe764391212177d258ff0af8 (patch)
tree9176e30684e8154ff5d1e71c6af9ab8fafd3b671 /upgrade.php
parente54bca5449c2e86ed05e59b04c827b0abaab33f6 (diff)
merge -r1997:1998 from branch 1.7 to trunk
Bug 679 fixed: avoid involuntarily upgrading more than once. A check of existing tables/columns was added to make sure the upgrade is not a refresh. git-svn-id: http://piwigo.org/svn/trunk@1999 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--upgrade.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/upgrade.php b/upgrade.php
index 330204f1d..065db9983 100644
--- a/upgrade.php
+++ b/upgrade.php
@@ -154,12 +154,12 @@ $template->assign_vars(array('RELEASE'=>PHPWG_VERSION));
// | upgrade choice |
// +-----------------------------------------------------------------------+
+$tables = get_tables();
+$columns_of = get_columns_of($tables);
+
if (!isset($_GET['version']))
{
// find the current release
- $tables = get_tables();
- $columns_of = get_columns_of($tables);
-
if (!in_array('param', $columns_of[PREFIX_TABLE.'config']))
{
// we're in branch 1.3, important upgrade, isn't it?
@@ -212,6 +212,11 @@ if (!isset($_GET['version']))
else
{
+ if (in_array(PREFIX_TABLE.'history_summary', $tables))
+ {
+ die('No database upgrade required, do not refresh the page');
+ }
+
$upgrade_file = PHPWG_ROOT_PATH.'install/upgrade_'.$_GET['version'].'.php';
if (is_file($upgrade_file))
{