aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
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 = '';