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
This commit is contained in:
emc3 2004-03-05 21:35:14 +00:00
parent 9c711968c3
commit e0ad33fffe
1 changed files with 8 additions and 4 deletions

View File

@ -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