Skip to content

Commit b9b7d05

Browse files
committed
updated the get_module_db function
1 parent 128efde commit b9b7d05

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/modules.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ function get_module_db($module)
129129
$GLOBALS['powerdns_dbh']->Type = 'mysqli';
130130
}
131131
return clone $GLOBALS['powerdns_dbh'];
132+
} elseif ($module == 'zonemta') {
133+
if (!isset($GLOBALS['zonemta_dbh'])) {
134+
$GLOBALS['zonemta_dbh'] = new \MyDb\Mysqli\Db(ZONEMTA_MYSQL_DB, ZONEMTA_MYSQL_USERNAME, ZONEMTA_MYSQL_PASSWORD, ZONEMTA_MYSQL_HOST);
135+
$GLOBALS['zonemta_dbh']->Type = 'mysqli';
136+
}
137+
return clone $GLOBALS['zonemta_dbh'];
132138
} else {
133139
if (isset($GLOBALS[$module.'_dbh'])) {
134140
return clone $GLOBALS[$module.'_dbh'];

0 commit comments

Comments
 (0)