Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Giraffaman committed Apr 12, 2024
1 parent 57b33fa commit cafab6b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion ext/rating/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion ext/rating/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -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: ["?"]));
}

/**
Expand Down
4 changes: 3 additions & 1 deletion ext/upload/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit cafab6b

Please sign in to comment.