diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/functions_tag.inc.php | 1 | ||||
-rw-r--r-- | include/ws_functions.inc.php | 13 |
2 files changed, 4 insertions, 10 deletions
diff --git a/include/functions_tag.inc.php b/include/functions_tag.inc.php index c9f239ef7..4f8c95563 100644 --- a/include/functions_tag.inc.php +++ b/include/functions_tag.inc.php @@ -258,6 +258,7 @@ SELECT id, name, url_name, count(*) counter if ($max_tags>0) { $query .= ' + ORDER BY counter DESC LIMIT 0,'.$max_tags; } diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index 5c0221e7e..dca9740d1 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -656,7 +656,6 @@ function ws_session_getStatus($params, &$service) */ function ws_tags_getList($params, &$service) { - global $user; $tags = get_available_tags(); if ($params['sort_by_counter']) { @@ -687,7 +686,7 @@ function ws_tags_getList($params, &$service) function ws_tags_getImages($params, &$service) { @include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php'); - global $user, $conf; + global $conf; // first build all the tag_ids we are interested in $tag_ids = array(); @@ -704,6 +703,8 @@ function ws_tags_getImages($params, &$service) in_array($tag['name'], $params['tag_name']) or in_array($tag['url_name'], $params['tag_url_name']) + or + in_array($tag['id'], $params['tag_id']) ) { $tag_ids[] = $tag['id']; @@ -711,14 +712,6 @@ function ws_tags_getImages($params, &$service) } unset($tags); - foreach( $params['tag_id'] as $tag_id ) - { - if ( (int)$tag_id > 0 ) - { - $tag_ids[] = $tag_id; - } - } - $tag_ids = array_unique( $tag_ids ); $image_ids = array(); |