diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2011-06-25 20:53:54 -0400 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2011-06-25 20:53:54 -0400 |
commit | 55aa44d2f6c79bbe173bcfa149755ee930bb48a1 (patch) | |
tree | 1bd9d6186a0c353c85e276ab553a5f43fd1e4381 /engine/lib/deprecated-1.8.php | |
parent | 59774f1999752f941d48dcae43d53d4a6cc8c0c0 (diff) | |
parent | 6008aea060c27be0b4e0bf81e4f111d0f6d47db3 (diff) | |
download | elgg-55aa44d2f6c79bbe173bcfa149755ee930bb48a1.tar.gz elgg-55aa44d2f6c79bbe173bcfa149755ee930bb48a1.tar.bz2 |
Merge branch '3554-upgrade_from_17'
Diffstat (limited to 'engine/lib/deprecated-1.8.php')
-rw-r--r-- | engine/lib/deprecated-1.8.php | 7 |
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; } /** |