This commit is contained in:
Shish 2024-01-05 15:32:07 +00:00
parent 4b954b2e68
commit 26630a4e3b
4 changed files with 7 additions and 6 deletions

View file

@ -224,7 +224,9 @@ if(class_exists("\\PHPUnit\\Framework\\TestCase")) {
"tags" => Tag::explode($tags),
"source" => null,
]));
if(count($dae->images) == 0) throw new \Exception("Upload failed :(");
if(count($dae->images) == 0) {
throw new \Exception("Upload failed :(");
}
return $dae->images[0]->id;
}

View file

@ -10,7 +10,7 @@ class BulkAddTheme extends Themelet
{
/**
* Show a standard page for results to be put into
*
*
* @param UploadResult[] $results
*/
public function display_upload_results(Page $page, array $results)

View file

@ -170,7 +170,7 @@ class GraphQL extends Extension
'source' => $source,
]));
return ["image_ids" => array_map(fn($im) => $im->id, $event->images)];
return ["image_ids" => array_map(fn ($im) => $im->id, $event->images)];
}
public function onCommand(CommandEvent $event)

View file

@ -120,12 +120,11 @@ class S3 extends Extension
if(is_null($new_tags)) {
$friendly = $image->parse_link_template('$id - $tags.$ext');
}
else {
} else {
$_orig_tags = $image->get_tag_array();
$image->tag_array = $new_tags;
$friendly = $image->parse_link_template('$id - $tags.$ext');
$image->tag_array = $_orig_tags;
$image->tag_array = $_orig_tags;
}
$client->putObject([