[tag_edit] mass edit CLI

This commit is contained in:
Shish 2024-01-10 18:01:16 +00:00
parent 219096d10b
commit 2c77a4e6a1

View file

@ -159,6 +159,21 @@ class TagEdit extends Extension
}
}
public function onCommand(CommandEvent $event)
{
global $database;
if ($event->cmd == "help") {
print "\ttag-replace <tag> <tag>\n";
print "\t\tmass replace tags\n\n";
}
if ($event->cmd == "tag-replace") {
print("Mass editing tags: '{$event->args[0]}' -> '{$event->args[1]}'\n");
if(count($event->args) == 2) {
$this->mass_tag_edit($event->args[0], $event->args[1], true);
}
}
}
// public function onPostListBuilding(PostListBuildingEvent $event)
// {
// global $user;