Adjusted rating setting migration

This commit is contained in:
Matthew Barbour 2019-06-27 23:30:00 -05:00 committed by matthew
parent a019786895
commit 0506adbf30

View file

@ -558,11 +558,17 @@ class Ratings extends Extension
if ($config->get_int(RatingsConfig::VERSION) < 4) { if ($config->get_int(RatingsConfig::VERSION) < 4) {
$value = $config->get_string("ext_rating_anon_privs"); $value = $config->get_string("ext_rating_anon_privs");
if(!empty($value)) {
$config->set_array("ext_rating_anonymous_privs", str_split($value)); $config->set_array("ext_rating_anonymous_privs", str_split($value));
}
$value = $config->get_string("ext_rating_user_privs"); $value = $config->get_string("ext_rating_user_privs");
if(!empty($value)) {
$config->set_array("ext_rating_user_privs", str_split($value)); $config->set_array("ext_rating_user_privs", str_split($value));
}
$value = $config->get_string("ext_rating_admin_privs"); $value = $config->get_string("ext_rating_admin_privs");
if(!empty($value)) {
$config->set_array("ext_rating_admin_privs", str_split($value)); $config->set_array("ext_rating_admin_privs", str_split($value));
}
switch ($database->get_driver_name()) { switch ($database->get_driver_name()) {