diff --git a/ext/rating/main.php b/ext/rating/main.php index d6fd30c99..ecc51a473 100644 --- a/ext/rating/main.php +++ b/ext/rating/main.php @@ -530,7 +530,10 @@ public function onUploadHeaderBuilding(UploadHeaderBuildingEvent $event): void public function onUploadSpecificBuilding(UploadSpecificBuildingEvent $event): void { - $event->add_part($this->theme->get_upload_specific_rater_html($event->suffix)); + global $config + if($config->get_bool(UploadConfig::ALLOW_SPECIFIC_RATINGS)) { + $event->add_part($this->theme->get_upload_specific_rater_html($event->suffix)); + } } /** diff --git a/ext/rating/theme.php b/ext/rating/theme.php index 05b0d511a..fb3e12f25 100644 --- a/ext/rating/theme.php +++ b/ext/rating/theme.php @@ -31,7 +31,7 @@ public function get_image_rater_html(int $image_id, string $rating, bool $can_ra public function get_upload_specific_rater_html(string $suffix): HTMLElement { - return TD($this->get_selection_rater_html(name:"rating{$suffix}", selected_options: [""])); + return TD($this->get_selection_rater_html(name:"rating{$suffix}", selected_options: ["?"])); } /** diff --git a/ext/upload/theme.php b/ext/upload/theme.php index 08609ce29..e5418211a 100644 --- a/ext/upload/theme.php +++ b/ext/upload/theme.php @@ -127,7 +127,9 @@ protected function build_upload_list(): HTMLElement } for ($i = 0; $i < $form_count; $i++) { $specific_fields = emptyHTML(); - $usfbe = send_event(new UploadSpecificBuildingEvent((string)$i)); + if($config->get_bool(UploadConfig::ALLOW_SPECIFIC_TAGS)) { + $usfbe = send_event(new UploadSpecificBuildingEvent((string)$i)); + } foreach ($usfbe->get_parts() as $part) { $specific_fields->appendChild($part); }