hacky fix for searching, make sure query variables are unique
This commit is contained in:
parent
e92813bfee
commit
c554a12be0
@ -23,6 +23,8 @@
|
|||||||
* Classes *
|
* Classes *
|
||||||
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||||
|
|
||||||
|
$tag_n = 0; // temp hack
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An object representing an entry in the images table. As of 2.2, this no
|
* An object representing an entry in the images table. As of 2.2, this no
|
||||||
* longer necessarily represents an image per se, but could be a video,
|
* longer necessarily represents an image per se, but could be a video,
|
||||||
@ -730,9 +732,11 @@ class Image {
|
|||||||
$sql = "0";
|
$sql = "0";
|
||||||
$terms = array();
|
$terms = array();
|
||||||
foreach($tag_querylets as $tq) {
|
foreach($tag_querylets as $tq) {
|
||||||
|
global $tag_n;
|
||||||
$sign = $tq->positive ? "+" : "-";
|
$sign = $tq->positive ? "+" : "-";
|
||||||
$sql .= " $sign (tag LIKE :tag)";
|
$sql .= " $sign (tag LIKE :tag$tag_n)";
|
||||||
$terms["tag"] = $tq->tag;
|
$terms["tag$tag_n"] = $tq->tag;
|
||||||
|
$tag_n++;
|
||||||
|
|
||||||
if($sign == "+") $positive_tag_count++;
|
if($sign == "+") $positive_tag_count++;
|
||||||
else $negative_tag_count++;
|
else $negative_tag_count++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user