Bit twiddling. Add type bitfield to categories table. see #3723

git-svn-id: https://develop.svn.wordpress.org/trunk@5184 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-04-05 21:16:02 +00:00
parent 5d754bf617
commit 8a8e57b000
6 changed files with 37 additions and 17 deletions
+4 -1
View File
@@ -1,5 +1,8 @@
<?php
define('TAXONOMY_CATEGORY', 1);
define('TAXONOMY_TAG', 2);
function get_all_category_ids() {
global $wpdb;
@@ -78,7 +81,7 @@ function &get_categories($args = '') {
else
$where .= ' AND category_count > 0';
} else {
$where .= ' AND ( tag_count = 0 OR ( tag_count != 0 AND ( link_count > 0 OR category_count > 0 ) ) ) ';
$where .= ' AND ( type & ' . TAXONOMY_CATEGORY . ' != 0 ) ';
}