WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#4114 closed defect (bug) (fixed)

getCategoryList should not include tag names

Reported by: redsweater Owned by:
Milestone: 2.2 Priority: normal
Severity: normal Version: 2.2
Component: XML-RPC Keywords:
Focuses: Cc:

Description

The getCategoryList implementation currently returns a list of all categories from the database, including those that are actually tag names. My understanding is that storage of tag names in the categories table is an implementation detail. The tag items should be filtered from the list that is returned by getCategoryList().

Attachments (1)

xmlrpc.php.diff (950 bytes) - added by redsweater 10 years ago.
Patch to exclude non-category taxonomies from the getCategoryList function.

Download all attachments as: .zip

Change History (5)

@redsweater
10 years ago

Patch to exclude non-category taxonomies from the getCategoryList function.

#1 @redsweater
10 years ago

Attaching patch xmlrpc.php.diff, with a change to exclude any categories whose type bitfield does not contain TAXONOMY_CATEGORY.

#2 @ryan
10 years ago

You can do the check directly in the query.

WHERE (type & " . TAXONOMY_CATEGORY . " != 0)

#3 @rob1n
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [5215]) Don't show categories in getCategoryList. fixes #4114

#4 @rob1n
10 years ago

Whoops, that changeset should be "Don't show tags" not "Don't show categories."

Note: See TracTickets for help on using tickets.