From aeaccb03bac243f653f9a3132ee97ecc6bb52bff Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 16 Jul 2012 21:07:59 -0700 Subject: make network tag and personal searches work again --- include/text.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') 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