better search by date
This commit is contained in:
parent
42016b2f9b
commit
a6f8ce2a14
@ -226,9 +226,10 @@ class Index extends Extension {
|
|||||||
$filename = strtolower($matches[2]);
|
$filename = strtolower($matches[2]);
|
||||||
$event->add_querylet(new Querylet('images.filename LIKE "%'.$filename.'%"'));
|
$event->add_querylet(new Querylet('images.filename LIKE "%'.$filename.'%"'));
|
||||||
}
|
}
|
||||||
else if(preg_match("/^posted=(([0-9\*]*)?(-[0-9\*]*)?(-[0-9\*]*)?)$/", $event->term, $matches)) {
|
else if(preg_match("/^posted(<|>|<=|>=|=)([0-9-]*)$/", $event->term, $matches)) {
|
||||||
$val = str_replace("*", "%", $matches[1]);
|
$cmp = $matches[1];
|
||||||
$event->add_querylet(new Querylet('images.posted LIKE "%'.$val.'%"'));
|
$val = $matches[2];
|
||||||
|
$event->add_querylet(new Querylet("images.posted $cmp :val", array("val"=>$val)));
|
||||||
}
|
}
|
||||||
else if(preg_match("/^size(<|>|<=|>=|=)(\d+)x(\d+)$/", $event->term, $matches)) {
|
else if(preg_match("/^size(<|>|<=|>=|=)(\d+)x(\d+)$/", $event->term, $matches)) {
|
||||||
$cmp = $matches[1];
|
$cmp = $matches[1];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user