[wp-trac] [WordPress Trac] #25775: WP_Date_Query table prefixing
WordPress Trac
noreply at wordpress.org
Wed Mar 26 21:28:22 UTC 2014
#25775: WP_Date_Query table prefixing
------------------------------------------------------+------------------
Reporter: ew_holmes | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.9
Component: Query | Version: 3.7
Severity: major | Resolution:
Keywords: 3.9-early needs-refresh needs-unit-tests | Focuses:
------------------------------------------------------+------------------
Comment (by Viper007Bond):
ew_holmes: I think your patch will work but it seems kind of hacky. I
think it'd be better to make `$valid_columns` an associative array of
column => table so that it's explicit.
wonderboymusic: As mentioned, your patch is an enhancement rather than a
bug fix. Let's open a separate ticket for that.
neoxx: Your patch won't work because the class is also used on the
comments table, not just the posts table.
-----
I just attached a new patch that is similar to ew_holmes's but explicitly
defines what column belongs to what table. This allows the class to be
used with other tables, such as the meta tables. Custom uses is why I
included the filter.
The problem with my patch is that it breaks the existing filter. The
filter is super new but that's probably still bad.
I'm not sure what to do. Rename the filter? Add a new filter and try to
make the existing one work as before?
Opinions welcome.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/25775#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list