aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-16 21:07:59 -0700
committerfriendica <info@friendica.com>2012-07-16 21:07:59 -0700
commitaeaccb03bac243f653f9a3132ee97ecc6bb52bff (patch)
tree02bb8b5e253e7894eee97291ecb670f9e5b95f12 /include
parent43a673c11e758f3a0ff79b502ddfcc126e72cde5 (diff)
downloadvolse-hubzilla-aeaccb03bac243f653f9a3132ee97ecc6bb52bff.tar.gz
volse-hubzilla-aeaccb03bac243f653f9a3132ee97ecc6bb52bff.tar.bz2
volse-hubzilla-aeaccb03bac243f653f9a3132ee97ecc6bb52bff.zip
make network tag and personal searches work again
Diffstat (limited to 'include')
-rw-r--r--include/text.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index 7163d5e88..1825ec572 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1364,6 +1364,14 @@ function file_tag_file_query($table,$s,$type = 'file') {
);
}
+function term_query($table,$s,$type = TERM_UNKNOWN) {
+
+ return sprintf(" AND " . (($table) ? dbesc($table) . '.' : '') . "id in (select term.oid from term where term.type = %d and term.term = '%s' and term.uid = " . (($table) ? dbesc($table) . '.' : '') . "uid ) ",
+ intval($type),
+ protect_sprintf(dbesc($s))
+ );
+}
+
// ex. given music,video return <music><video> or [music][video]
function file_tag_list_to_file($list,$type = 'file') {
$tag_list = '';