limit results by default (ideally we'd have a --limit flag...)
This commit is contained in:
parent
32662af1ac
commit
134d2c029c
@ -210,11 +210,8 @@ class Index extends Extension
|
|||||||
print "\t\tsearch the database and print results\n\n";
|
print "\t\tsearch the database and print results\n\n";
|
||||||
}
|
}
|
||||||
if ($event->cmd == "search") {
|
if ($event->cmd == "search") {
|
||||||
if (count($event->args) < 1) {
|
$query = count($event->args) > 0 ? Tag::explode($event->args[0]) : [];
|
||||||
return;
|
$items = Image::find_images(0, 100, $query);
|
||||||
}
|
|
||||||
$query = count($event) > 0 ? Tag::explode($event->args[0]) : [];
|
|
||||||
$items = Image::find_images(0, null, $query);
|
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
print("{$item->hash}\n");
|
print("{$item->hash}\n");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user