diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2011-08-25 10:00:38 -0700 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2011-08-25 10:00:38 -0700 |
commit | dccc333c765bb28da55b4a55d9c916acdb88413a (patch) | |
tree | bdd26a0b4cd85241a19b7fcb2c0770f0ac3eb9f0 /engine/lib/deprecated-1.8.php | |
parent | ec7b94a64aef23b85866ecdac8e8acc712d29bb6 (diff) | |
parent | 003cb81c7888f4d2fd763e5814027c6f8d71186f (diff) | |
download | elgg-dccc333c765bb28da55b4a55d9c916acdb88413a.tar.gz elgg-dccc333c765bb28da55b4a55d9c916acdb88413a.tar.bz2 |
Merge branch 'master' of github.com:brettp/Elgg
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; } /** |