aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHabeas Codice <habeascodice@federated.social>2014-11-22 13:27:52 -0800
committerHabeas Codice <habeascodice@federated.social>2014-11-22 13:27:52 -0800
commit8ac3b938fde2ccd7719ac1c22ef5460b35298d78 (patch)
tree7d8e3a730eb26f3abe659c16baef333a198b08b1 /include
parentab5bf1b7d69f4027f595eef56cf4d99207b8b46e (diff)
downloadvolse-hubzilla-8ac3b938fde2ccd7719ac1c22ef5460b35298d78.tar.gz
volse-hubzilla-8ac3b938fde2ccd7719ac1c22ef5460b35298d78.tar.bz2
volse-hubzilla-8ac3b938fde2ccd7719ac1c22ef5460b35298d78.zip
added dbdriver to siteinfo json to better track affected sites
Diffstat (limited to 'include')
-rwxr-xr-xinclude/dba/dba_driver.php6
-rwxr-xr-xinclude/dba/dba_mysql.php4
-rwxr-xr-xinclude/dba/dba_mysqli.php4
-rw-r--r--include/dba/dba_postgres.php4
4 files changed, 18 insertions, 0 deletions
diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php
index a62a5e6e2..4a0f5e37b 100755
--- a/include/dba/dba_driver.php
+++ b/include/dba/dba_driver.php
@@ -104,6 +104,12 @@ abstract class dba_driver {
*/
abstract function close();
+ /**
+ * @brief Return text name for db driver
+ *
+ * This abstract function needs to be implemented in the real driver.
+ */
+ abstract function getdriver();
function __construct($server, $port, $user,$pass,$db,$install = false) {
if(($install) && (! $this->install($server, $port, $user, $pass, $db))) {
diff --git a/include/dba/dba_mysql.php b/include/dba/dba_mysql.php
index f5a2a47ba..3cadad6dc 100755
--- a/include/dba/dba_mysql.php
+++ b/include/dba/dba_mysql.php
@@ -59,5 +59,9 @@ class dba_mysql extends dba_driver {
mysql_close($this->db);
$this->connected = false;
}
+
+ function getdriver() {
+ return 'mysql';
+ }
}
diff --git a/include/dba/dba_mysqli.php b/include/dba/dba_mysqli.php
index c71f493b0..74a999974 100755
--- a/include/dba/dba_mysqli.php
+++ b/include/dba/dba_mysqli.php
@@ -72,5 +72,9 @@ class dba_mysqli extends dba_driver {
$this->db->close();
$this->connected = false;
}
+
+ function getdriver() {
+ return 'mysqli';
+ }
} \ No newline at end of file
diff --git a/include/dba/dba_postgres.php b/include/dba/dba_postgres.php
index a390292a5..ba4366d13 100644
--- a/include/dba/dba_postgres.php
+++ b/include/dba/dba_postgres.php
@@ -109,4 +109,8 @@ class dba_postgres extends dba_driver {
function concat($fld, $sep) {
return 'string_agg(' . $fld . ',\'' . $sep . '\')';
}
+
+ function getdriver() {
+ return 'pgsql';
+ }
} \ No newline at end of file