inline a one-use function
This commit is contained in:
parent
b6656e8141
commit
f5c402ad85
@ -735,18 +735,6 @@ class Image
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Send list of metatags to be parsed.
|
|
||||||
*
|
|
||||||
* #param string[] $metatags
|
|
||||||
*/
|
|
||||||
public function parse_metatags(array $metatags, int $image_id): void
|
|
||||||
{
|
|
||||||
foreach ($metatags as $tag) {
|
|
||||||
send_event(new TagTermParseEvent($tag, $image_id, true));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete this image from the database and disk
|
* Delete this image from the database and disk
|
||||||
*/
|
*/
|
||||||
|
@ -196,7 +196,9 @@ class TagEdit extends Extension
|
|||||||
if ($user->can(Permissions::EDIT_IMAGE_TAG) && (!$event->image->is_locked() || $user->can(Permissions::EDIT_IMAGE_LOCK))) {
|
if ($user->can(Permissions::EDIT_IMAGE_TAG) && (!$event->image->is_locked() || $user->can(Permissions::EDIT_IMAGE_LOCK))) {
|
||||||
$event->image->set_tags($event->tags);
|
$event->image->set_tags($event->tags);
|
||||||
}
|
}
|
||||||
$event->image->parse_metatags($event->metatags, $event->image->id);
|
foreach ($event->metatags as $tag) {
|
||||||
|
send_event(new TagTermParseEvent($tag, $event->image->id));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onSourceSet(SourceSetEvent $event)
|
public function onSourceSet(SourceSetEvent $event)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user