[wp-trac] [WordPress Trac] #17065: Independent ASC/DESC in multiple ORDER BY statement.

WordPress Trac wp-trac at lists.automattic.com
Fri Aug 31 00:32:37 UTC 2012


#17065: Independent ASC/DESC in multiple ORDER BY statement.
-------------------------------------------------+-------------------------
 Reporter:  ericmann                             |       Owner:  ericmann
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Query                                |  Review
 Severity:  normal                               |     Version:  3.1
 Keywords:  has-patch needs-testing needs-unit-  |  Resolution:
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by azaozz):

 Replying to [comment:29 scribu]:
 > ...A single extra or missing whitespace can make the test fail...

 Was looking at that when the test is on HTML code too (for wpautop). A
 simple `normalize_whitespace` regex is enough to fix this (needs to run on
 both strings before comparing them):

 {{{
 $str = preg_replace( '/[\r\n\t ]+/', ' ', $str );
 }}}

 `\s` is not good as it "eats" parts of some utf-8 chars.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17065#comment:30>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list