diff options
Diffstat (limited to '')
-rw-r--r-- | include/functions_url.inc.php | 2 | ||||
-rw-r--r-- | include/section_init.inc.php | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/include/functions_url.inc.php b/include/functions_url.inc.php index fb94cb4b4..ba55c4c0d 100644 --- a/include/functions_url.inc.php +++ b/include/functions_url.inc.php @@ -524,7 +524,7 @@ function parse_section_url( $tokens, &$next_token) { array_push($requested_tag_ids, $matches[1]); } - else + elseif ( !empty($tokens[$i]) ) { array_push($requested_tag_url_names, $tokens[$i]); } diff --git a/include/section_init.inc.php b/include/section_init.inc.php index cabfae546..f105aaaa8 100644 --- a/include/section_init.inc.php +++ b/include/section_init.inc.php @@ -287,15 +287,13 @@ else if (!empty($items) ) { $query = ' -SELECT image_id +SELECT DISTINCT(image_id) FROM '.IMAGE_CATEGORY_TABLE.' INNER JOIN '.IMAGES_TABLE.' ON image_id=id WHERE image_id IN ('.implode(',', $items).') '.$forbidden. $conf['order_by'].' ;'; - $items = array_unique( - array_from_query($query, 'image_id') - ); + $items = array_from_query($query, 'image_id'); } $title = get_tags_content_title(); @@ -304,7 +302,7 @@ SELECT image_id $page, array( 'title' => $title, - 'items' => array_values($items), + 'items' => $items, ) ); } |