Ticket #6773 (closed defect: fixed)

Opened 6 months ago

Last modified 6 months ago

get_pages fixes

Reported by: filosofo Assigned to: anonymous
Priority: normal Milestone: 2.6
Component: General Version:
Severity: normal Keywords: get_pages has-patch
Cc: filosofo

Description

get_pages queries don't work as expected:

  • meta_key and meta_value are listed as separate potential parameters, but they have to be used together, or you get really odd behavior. One should be able to use them separately, as in the following example, which should return an array of pages with the meta_key of 'whatever':

$pages = get_pages(array('meta_key' => 'whatever'));
The above fails fatally.

  • LEFT JOIN is more efficient

Attachments

get_pages.diff (1.5 kB) - added by filosofo on 04/18/08 20:20:55.

Change History

04/18/08 20:20:55 changed by filosofo

  • attachment get_pages.diff added.

04/18/08 22:29:43 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [7746]) Fix meta_key and meta_value queries in get_pages(). Props filosofo. fixes #6773 for trunk