aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_webserv.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions_webserv.inc.php')
-rw-r--r--include/functions_webserv.inc.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/functions_webserv.inc.php b/include/functions_webserv.inc.php
index 6269ecb1f..aad1201a0 100644
--- a/include/functions_webserv.inc.php
+++ b/include/functions_webserv.inc.php
@@ -126,4 +126,23 @@ function check_target($list)
}
return $list;
}
+
+
+// FIXME Function which could already exist somewhere else
+function convert_catlist($cat_ids)
+{
+ $cat_list = implode(',', $cat_ids);
+ $ret_ids = array();
+ $query = '
+ SELECT DISTINCT image_id
+ FROM '.IMAGE_CATEGORY_TABLE.'
+ WHERE category_id in ('.$cat_list.')
+ ;';
+ $result = pwg_query($query);
+ while ($row = mysql_fetch_array($result))
+ {
+ $ret_ids[] = $row['image_id'];
+ }
+ return $ret_ids;
+}
?>