[cron_uploader] minor fixes

This commit is contained in:
Shish 2024-01-04 19:21:29 +00:00
parent 7524abe040
commit e3febc5488
2 changed files with 3 additions and 3 deletions

View file

@ -464,7 +464,7 @@ class CronUploader extends Extension
/**
* Generate the necessary DataUploadEvent for a given image and tags.
*/
private function add_image(string $tmpname, string $filename, string $tags): DataUploadEvent
private function add_image(string $tmpname, string $filename, array $tags): DataUploadEvent
{
$event = add_image($tmpname, $filename, $tags, null);
@ -512,7 +512,7 @@ class CronUploader extends Extension
foreach (new \RecursiveIteratorIterator($ite) as $fullpath => $cur) {
if (!is_link($fullpath) && !is_dir($fullpath) && !$this->is_skippable_file($fullpath)) {
$relativePath = substr($fullpath, strlen($base));
$tags = Tag::implode(path_to_tags($relativePath));
$tags = path_to_tags($relativePath);
yield [
0 => $fullpath,

View file

@ -34,7 +34,7 @@ class CronUploaderTheme extends Themelet
$page->set_heading("Cron Uploader");
if (!$config->get_bool(UserConfig::ENABLE_API_KEYS)) {
$info_html .= "<b style='color:red'>THIS EXTENSION REQUIRES USER API KEYS TO BE ENABLED IN <a href=''>BOARD ADMIN</a></b>";
$info_html .= "<b style='color:red'>THIS EXTENSION REQUIRES USER API KEYS TO BE ENABLED IN <a href=''>BOARD ADMIN</a></b><br/>";
}
$info_html .= "<b>Information</b>