Database driver constants

This commit is contained in:
Matthew Barbour
2019-06-14 13:17:03 -05:00
committed by matthew
parent 444de26ce3
commit 6f501a6e74
19 changed files with 53 additions and 49 deletions

View File

@@ -68,7 +68,7 @@ class LogDatabase extends Extension
$args["module"] = $_GET["module"];
}
if (!empty($_GET["user"])) {
if ($database->get_driver_name() == "pgsql") {
if ($database->get_driver_name() == Database::PGSQL_DRIVER) {
if (preg_match("#\d+\.\d+\.\d+\.\d+(/\d+)?#", $_GET["user"])) {
$wheres[] = "(username = :user1 OR text(address) = :user2)";
$args["user1"] = $_GET["user"];