From 37032d453c850225119c293c59150ab8c97387dc Mon Sep 17 00:00:00 2001 From: vdigital Date: Mon, 18 Dec 2006 06:44:11 +0000 Subject: WEB Service: Some corrections but still an incomplete version. git-svn-id: http://piwigo.org/svn/trunk@1674 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_webserv.inc.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include') 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; +} ?> -- cgit v1.2.3