From e0ad33fffe72bb295f0b5068d274e6f488bde83e Mon Sep 17 00:00:00 2001 From: emc3 Date: Fri, 5 Mar 2004 21:35:14 +0000 Subject: [PATCH] Allow 'limit = 0' in Link Categories to hide a category. git-svn-id: http://svn.automattic.com/wordpress/trunk@960 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/links.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/wp-includes/links.php b/wp-includes/links.php index 96b5f8805..4f9604414 100644 --- a/wp-includes/links.php +++ b/wp-includes/links.php @@ -530,10 +530,14 @@ function get_links_list($order = 'name', $hide_if_empty = 'obsolete') { // Fetch the link category data as an array of hashes - $cats = $wpdb->get_results("SELECT DISTINCT link_category, cat_name, show_images, - show_description, show_rating, show_updated, sort_order, sort_desc, list_limit -FROM `$tablelinks` LEFT JOIN `$tablelinkcategories` ON (link_category = cat_id) -WHERE link_visible = 'Y' + $cats = $wpdb->get_results(" + SELECT DISTINCT link_category, cat_name, show_images, + show_description, show_rating, show_updated, sort_order, + sort_desc, list_limit + FROM `$tablelinks` + LEFT JOIN `$tablelinkcategories` ON (link_category = cat_id) + WHERE link_visible = 'Y' + AND list_limit <> 0 ORDER BY $cat_order $direction ", ARRAY_A); // Display each category