[wp-trac] Re: [WordPress Trac] #3714: wp_get_linksbyname shows all
categories
WordPress Trac
wp-trac at lists.automattic.com
Mon Feb 12 22:28:51 GMT 2007
#3714: wp_get_linksbyname shows all categories
----------------------------+-----------------------------------------------
Reporter: tandilboy | Owner: anonymous
Type: defect | Status: reopened
Priority: normal | Milestone: 2.1.1
Component: Administration | Version: 2.1
Severity: major | Resolution:
Keywords: |
----------------------------+-----------------------------------------------
Comment (by Nothus):
Replying to [ticket:3714 tandilboy]:
> i using the wp_get_linksbyname in diferent instances showed by
categories, in 2.1 the wp_get_linksbyname can´t filter categories and
shows all links in all instances
It appears that the problem is not in wp_get_linksbyname it's in
wp_get_links (bookmark-template.php).
parse_str($args) messes up the first var it's trying to parse in $args
because it starts with something like '/?varname=var'. So, in the case
where it's trying to look up a category, $category never gets set and will
lookup all categories. My temp fix was to strip out everything up to the
'?' and it now works as it should.
A quick grep through the code base show lots of parse_str($args) and I
would imagine that this problem would also be happening there.
--
Ticket URL: <http://trac.wordpress.org/ticket/3714#comment:6>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list