php8.1 gogogo

This commit is contained in:
Shish
2022-10-28 01:45:35 +01:00
parent 522b57da37
commit a04bc2e7e4
67 changed files with 184 additions and 346 deletions

View File

@@ -501,11 +501,11 @@ class Ratings extends Extension
if ($this->get_version(RatingsConfig::VERSION) < 3) {
$database->execute("UPDATE images SET rating = 'u' WHERE rating is null");
switch ($database->get_driver_name()) {
case DatabaseDriver::MYSQL:
switch ($database->get_driver_id()) {
case DatabaseDriverID::MYSQL:
$database->execute("ALTER TABLE images CHANGE rating rating CHAR(1) NOT NULL DEFAULT 'u'");
break;
case DatabaseDriver::PGSQL:
case DatabaseDriverID::PGSQL:
$database->execute("ALTER TABLE images ALTER COLUMN rating SET DEFAULT 'u'");
$database->execute("ALTER TABLE images ALTER COLUMN rating SET NOT NULL");
break;
@@ -527,11 +527,11 @@ class Ratings extends Extension
$config->set_array("ext_rating_admin_privs", str_split($value));
}
switch ($database->get_driver_name()) {
case DatabaseDriver::MYSQL:
switch ($database->get_driver_id()) {
case DatabaseDriverID::MYSQL:
$database->execute("ALTER TABLE images CHANGE rating rating CHAR(1) NOT NULL DEFAULT '?'");
break;
case DatabaseDriver::PGSQL:
case DatabaseDriverID::PGSQL:
$database->execute("ALTER TABLE images ALTER COLUMN rating SET DEFAULT '?'");
break;
}