[tag_edit] mass edit CLI
This commit is contained in:
parent
219096d10b
commit
2c77a4e6a1
1 changed files with 15 additions and 0 deletions
|
@ -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)
|
// public function onPostListBuilding(PostListBuildingEvent $event)
|
||||||
// {
|
// {
|
||||||
// global $user;
|
// global $user;
|
||||||
|
|
Reference in a new issue