From 3f6b175879dee3dff45556d58d61a96730ca6dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Sat, 15 Mar 2014 06:40:13 +0100 Subject: [PATCH] Database: factorized getVersionArray() --- htdocs/core/db/DoliDB.class.php | 10 ++++++++++ htdocs/core/db/mssql.class.php | 11 ----------- htdocs/core/db/mysql.class.php | 10 ---------- htdocs/core/db/mysqli.class.php | 10 ---------- htdocs/core/db/pgsql.class.php | 10 ---------- htdocs/core/db/sqlite.class.php | 10 ---------- 6 files changed, 10 insertions(+), 51 deletions(-) diff --git a/htdocs/core/db/DoliDB.class.php b/htdocs/core/db/DoliDB.class.php index 2da6ad6cdda..5fae6dab374 100644 --- a/htdocs/core/db/DoliDB.class.php +++ b/htdocs/core/db/DoliDB.class.php @@ -125,6 +125,16 @@ abstract class DoliDB implements Database } } + /** + * Return version of database server into an array + * + * @return array Version array + */ + function getVersionArray() + { + return explode('.',$this->getVersion()); + } + /** * Define sort criteria of request * diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php index 2b7f28a7b60..7459b4c0019 100644 --- a/htdocs/core/db/mssql.class.php +++ b/htdocs/core/db/mssql.class.php @@ -195,17 +195,6 @@ class DoliDBMssql extends DoliDB return $version['computed']; } - - /** - * Return version of database server into an array - * - * @return array Version array - */ - function getVersionArray() - { - return explode('.',$this->getVersion()); - } - /** * Return version of database client driver * diff --git a/htdocs/core/db/mysql.class.php b/htdocs/core/db/mysql.class.php index 9bea3e609d2..2bf0474157f 100644 --- a/htdocs/core/db/mysql.class.php +++ b/htdocs/core/db/mysql.class.php @@ -221,16 +221,6 @@ class DoliDBMysql extends DoliDB return mysql_get_server_info($this->db); } - /** - * Return version of database server into an array - * - * @return array Version array - */ - function getVersionArray() - { - return explode('.',$this->getVersion()); - } - /** * Return version of database client driver * diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 73525be4d5b..bf9808a39e2 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -225,16 +225,6 @@ class DoliDBMysqli extends DoliDB return mysqli_get_server_info($this->db); } - /** - * Return version of database server into an array - * - * @return array Version array - */ - function getVersionArray() - { - return explode('.',$this->getVersion()); - } - /** * Return version of database client driver * diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 44e8b3dc274..a284756caed 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -428,16 +428,6 @@ class DoliDBPgsql extends DoliDB return ''; } - /** - * Return version of database server into an array - * - * @return array Version array - */ - function getVersionArray() - { - return explode('.',$this->getVersion()); - } - /** * Return version of database client driver * diff --git a/htdocs/core/db/sqlite.class.php b/htdocs/core/db/sqlite.class.php index ab6582affc5..a631fad8220 100644 --- a/htdocs/core/db/sqlite.class.php +++ b/htdocs/core/db/sqlite.class.php @@ -345,16 +345,6 @@ class DoliDBSqlite extends DoliDB return $row[0]; } - /** - * Return version of database server into an array - * - * @return array Version array - */ - function getVersionArray() - { - return explode('.',$this->getVersion()); - } - /** * Return version of database client driver *