Merge branch 'master' of github.com:shish/shimmie2

This commit is contained in:
Shish 2012-02-22 09:38:01 +00:00
commit 6110be6af9
4 changed files with 9 additions and 8 deletions

View File

@ -30,8 +30,8 @@
* </ul> * </ul>
* <li>filesize (=, &lt;, &gt;, &lt;=, &gt;=) size, eg * <li>filesize (=, &lt;, &gt;, &lt;=, &gt;=) size, eg
* <ul> * <ul>
* <li>filesize>1024 -- no images under 1KB * <li>filesize&gt;1024 -- no images under 1KB
* <li>filesize<=3MB -- shorthand filesizes are supported too * <li>filesize&lt=3MB -- shorthand filesizes are supported too
* </ul> * </ul>
* <li>id (=, &lt;, &gt;, &lt;=, &gt;=) number, eg * <li>id (=, &lt;, &gt;, &lt;=, &gt;=) number, eg
* <ul> * <ul>
@ -54,9 +54,9 @@
* <ul> * <ul>
* <li>filename=kitten -- find all images with "kitten" in the original filename * <li>filename=kitten -- find all images with "kitten" in the original filename
* </ul> * </ul>
* <li>posted=date, eg * <li>posted (=, &lt;, &gt;, &lt;=, &gt;=) date, eg
* <ul> * <ul>
* <li>posted=2009-12-25 -- find images posted on the 25th December * <li>posted&gt;=2009-12-25 posted&lt;=2010-01-01 -- find images posted between christmas and new year
* </ul> * </ul>
* </ul> * </ul>
* <p>Search items can be combined to search for images which match both, * <p>Search items can be combined to search for images which match both,
@ -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];

BIN
favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

BIN
favicon_64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -63,7 +63,7 @@ require_once "lib/context.php";
if(CONTEXT) { if(CONTEXT) {
ctx_set_log(CONTEXT); ctx_set_log(CONTEXT);
} }
ctx_log_start($_SERVER["REQUEST_URI"], true, true); ctx_log_start(@$_SERVER["REQUEST_URI"], true, true);
if(COVERAGE) { if(COVERAGE) {
_start_coverage(); _start_coverage();
register_shutdown_function("_end_coverage"); register_shutdown_function("_end_coverage");