From 7ddd9521b3f3a397da3b0a6b56238d31414eb4be Mon Sep 17 00:00:00 2001 From: brettp Date: Thu, 28 Oct 2010 19:17:36 +0000 Subject: Standardized code in all of core, not including language files, tests, or core mods. git-svn-id: http://code.elgg.org/elgg/trunk@7124 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/version.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'engine/lib/version.php') diff --git a/engine/lib/version.php b/engine/lib/version.php index db3eb907e..c11707417 100644 --- a/engine/lib/version.php +++ b/engine/lib/version.php @@ -3,15 +3,17 @@ * Elgg version library. * Contains code for handling versioning and upgrades. * - * @package Elgg - * @subpackage Core + * @package Elgg.Core + * @subpackage Version */ /** * Run any php upgrade scripts which are required * - * @param int $version Version upgrading from. - * @param bool $quiet Suppress errors. Don't use this. + * @param int $version Version upgrading from. + * @param bool $quiet Suppress errors. Don't use this. + * + * @return bool */ function upgrade_code($version, $quiet = FALSE) { global $CONFIG; @@ -42,7 +44,7 @@ function upgrade_code($version, $quiet = FALSE) { asort($upgrades); if (sizeof($upgrades) > 0) { - foreach($upgrades as $upgrade) { + foreach ($upgrades as $upgrade) { // hide all errors. if ($quiet) { // hide include errors as well as any exceptions that might happen @@ -68,7 +70,8 @@ function upgrade_code($version, $quiet = FALSE) { /** * Get the current version information * - * @param true|false $humanreadable Whether to return a human readable version (default: false) + * @param bool $humanreadable Whether to return a human readable version (default: false) + * * @return string|false Depending on success */ function get_version($humanreadable = false) { @@ -98,13 +101,15 @@ function version_upgrade_check() { } /** - * Upgrades Elgg + * Upgrades Elgg Database and code + * + * @return bool * */ function version_upgrade() { // It's possible large upgrades could exceed the max execution time. set_time_limit(0); - + $dbversion = (int) datalist_get('version'); // No version number? Oh snap...this is an upgrade from a clean installation < 1.7. -- cgit v1.2.3