nice, event-based command line support; try 'php index.php' for info

This commit is contained in:
Shish
2012-06-17 20:05:16 +01:00
parent 427175983b
commit 082e6fa31b
5 changed files with 97 additions and 13 deletions

View File

@@ -27,6 +27,18 @@ class BulkAdd extends Extension {
}
}
public function onCommand(CommandEvent $event) {
if($event->cmd == "help") {
print " bulk-add [directory]\n";
print " Import this directory\n\n";
}
if($event->cmd == "bulk-add") {
if(count($event->args) == 1) {
$this->add_dir($event->args[0]);
}
}
}
public function onAdminBuilding(AdminBuildingEvent $event) {
$this->theme->display_admin_block();
}