aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-06-25 20:53:13 -0400
committerBrett Profitt <brett.profitt@gmail.com>2011-06-25 20:53:13 -0400
commit6008aea060c27be0b4e0bf81e4f111d0f6d47db3 (patch)
tree1bd9d6186a0c353c85e276ab553a5f43fd1e4381
parent6e8662a4d6bae1ba433664555df3b5fa05049172 (diff)
downloadelgg-6008aea060c27be0b4e0bf81e4f111d0f6d47db3.tar.gz
elgg-6008aea060c27be0b4e0bf81e4f111d0f6d47db3.tar.bz2
Don't say the db was upgradeded when it wasn't.
-rw-r--r--engine/lib/deprecated-1.8.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/engine/lib/deprecated-1.8.php b/engine/lib/deprecated-1.8.php
index d92257a09..ff4fa0756 100644
--- a/engine/lib/deprecated-1.8.php
+++ b/engine/lib/deprecated-1.8.php
@@ -20,7 +20,7 @@
* @param string $fromdir Optional directory to load upgrades from. default: engine/schema/upgrades/
* @param bool $quiet If true, suppress all error messages. Only use for the upgrade from <=1.6.
*
- * @return bool
+ * @return int The number of upgrades run.
* @see upgrade.php
* @see version.php
* @deprecated 1.8 Use PHP upgrades for sql changes.
@@ -35,6 +35,8 @@ function db_upgrade($version, $fromdir = "", $quiet = FALSE) {
if (!$fromdir) {
$fromdir = $CONFIG->path . 'engine/schema/upgrades/';
}
+
+ $i = 0;
if ($handle = opendir($fromdir)) {
$sqlupgrades = array();
@@ -65,11 +67,12 @@ function db_upgrade($version, $fromdir = "", $quiet = FALSE) {
} else {
run_sql_script($fromdir . $sqlfile);
}
+ $i++;
}
}
}
- return TRUE;
+ return $i;
}
/**