Skip to content

Commit

Permalink
merge upstream changes into pr0booru theme; re-fix upload form count
Browse files Browse the repository at this point in the history
  • Loading branch information
Giraffaman committed Apr 12, 2024
1 parent 29cf5ff commit 2f69aa9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion ext/upload/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,13 @@ protected function build_upload_list(): HTMLElement
)
);

for ($i = 0; $i < $upload_count; $i++) {
# probably not a good idea to show more file inputs than max_file_uploads
if($form_count > $upload_count) {
$form_count = $upload_count;
} elseif ($form_count < 1) {
$form_count = 1;
}
for ($i = 0; $i < $form_count; $i++) {
$specific_fields = emptyHTML();
$usfbe = send_event(new UploadSpecificBuildingEvent((string)$i));
foreach ($usfbe->get_parts() as $part) {
Expand Down
2 changes: 1 addition & 1 deletion themes/pr0booru/index.theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ protected function build_table(array $images, ?string $query): string
$h_query = html_escape($query);
$table = "<div class='shm-image-list' data-query='$h_query'>";
foreach ($images as $image) {
$table .= "\t<span class=\"thumb\">" . $this->build_thumb_html($image) . "</span>\n";
$table .= $this->build_thumb_html($image) . "\n";
}
$table .= "</div>";
return $table;
Expand Down

0 comments on commit 2f69aa9

Please sign in to comment.