aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2023-04-13 18:51:13 +0200
committerMario Vavti <mario@mariovavti.com>2023-04-13 18:51:13 +0200
commit2bab7e26931d67ed4d63cdbd299b85a05d359813 (patch)
treef7b26b748737cd595f9b1ec5bf39c9e75b1aa628 /include/dba
parent824497b97a2bcd0afe7a74c94e3992723c22ccdf (diff)
downloadvolse-hubzilla-2bab7e26931d67ed4d63cdbd299b85a05d359813.tar.gz
volse-hubzilla-2bab7e26931d67ed4d63cdbd299b85a05d359813.tar.bz2
volse-hubzilla-2bab7e26931d67ed4d63cdbd299b85a05d359813.zip
prevent duplicate definitions
Diffstat (limited to 'include/dba')
-rw-r--r--include/dba/dba_driver.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php
index 152be7f88..631513819 100644
--- a/include/dba/dba_driver.php
+++ b/include/dba/dba_driver.php
@@ -67,9 +67,17 @@ class DBA {
require_once('include/dba/dba_pdo.php');
self::$dba = new dba_pdo($server,self::$scheme,$port,$user,$pass,$db,$db_charset,$install);
- define('NULL_DATE', self::$null_date);
- define('ACTIVE_DBTYPE', self::$dbtype);
- define('TQUOT', self::$tquot);
+ if (!defined('NULL_DATE')) {
+ define('NULL_DATE', self::$null_date);
+ }
+
+ if (!defined('ACTIVE_DBTYPE')) {
+ define('ACTIVE_DBTYPE', self::$dbtype);
+ }
+
+ if (!defined('TQUOT')) {
+ define('TQUOT', self::$tquot);
+ }
return self::$dba;
}