aboutsummaryrefslogtreecommitdiffstats
path: root/include/dblayer/functions_sqlite.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/dblayer/functions_sqlite.inc.php')
-rw-r--r--include/dblayer/functions_sqlite.inc.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/dblayer/functions_sqlite.inc.php b/include/dblayer/functions_sqlite.inc.php
index 48bb5fd89..5c8f76a9c 100644
--- a/include/dblayer/functions_sqlite.inc.php
+++ b/include/dblayer/functions_sqlite.inc.php
@@ -64,6 +64,21 @@ function pwg_db_connect($host, $user, $password, $database)
return $link;
}
+function pwg_db_check_version()
+{
+ $current_version = pwg_get_db_version();
+ if (version_compare($current_version, REQUIRED_SQLITE_VERSION, '<'))
+ {
+ fatal_error(
+ sprintf(
+ 'your database version is too old, you have "%s" and you need at least "%s"',
+ $current_version,
+ REQUIRED_SQLITE_VERSION
+ )
+ );
+ }
+}
+
function pwg_db_check_charset()
{
return true;