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

@ -480,14 +480,14 @@ class CommentList extends Extension
global $config, $database;
// sqlite fails at intervals
if ($database->get_driver_name() === "sqlite") {
if ($database->get_driver_name() === Database::SQLITE_DRIVER) {
return false;
}
$window = int_escape($config->get_int('comment_window'));
$max = int_escape($config->get_int('comment_limit'));
if ($database->get_driver_name() == "mysql") {
if ($database->get_driver_name() == Database::MYSQL_DRIVER) {
$window_sql = "interval $window minute";
} else {
$window_sql = "interval '$window minute'";