From 1f851e08ba9274fa524db6f75b2c2cc21ec4dcf2 Mon Sep 17 00:00:00 2001 From: marcus Date: Tue, 19 Aug 2008 14:12:35 +0000 Subject: Refs #256: Basic installation parameters checked. Fixes #266: If the install flag isn't set then elgg_view will no longer attempt to load data from the database. git-svn-id: https://code.elgg.org/elgg/trunk@2016 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/database.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'engine/lib/database.php') diff --git a/engine/lib/database.php b/engine/lib/database.php index 9df5f991c..86044a375 100644 --- a/engine/lib/database.php +++ b/engine/lib/database.php @@ -408,6 +408,27 @@ throw new DatabaseException(sprintf(elgg_echo('DatabaseException:ScriptNotFound'), $scriptlocation)); } + } + + /** + * This function, called by validate_platform(), will check whether the installed version of + * MySQL meets the minimum required. + * + * TODO: If multiple dbs are supported check which db is supported and use the appropriate code to validate + * the appropriate version. + * + * @return bool + */ + function db_check_version() + { + $version = mysql_get_server_info(); + + $points = explode('.', $version); + + if ($points[0] < 5) + return false; + + return true; } /** -- cgit v1.2.3