aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_webserv.inc.php
diff options
context:
space:
mode:
authorvdigital <vdigital@piwigo.org>2006-12-18 06:44:11 +0000
committervdigital <vdigital@piwigo.org>2006-12-18 06:44:11 +0000
commit37032d453c850225119c293c59150ab8c97387dc (patch)
treee53afe8c1b6b0fc24d66024f29d205a575edb71f /include/functions_webserv.inc.php
parent9a4fb6cef4d5c0f85074a8fa10fcae0be3778729 (diff)
WEB Service: Some corrections but still an incomplete version.
git-svn-id: http://piwigo.org/svn/trunk@1674 68402e56-0260-453c-a942-63ccdbb3a9ee
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;
+}
?>