Changeset 7593 for branches/2.5/wp-includes/formatting.php
- Timestamp:
- 04/03/2008 03:06:01 AM (18 years ago)
- File:
-
- 1 edited
-
branches/2.5/wp-includes/formatting.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.5/wp-includes/formatting.php
r7520 r7593 365 365 366 366 return $title; 367 } 368 369 // ensures a string is a valid SQL order by clause like: post_name ASC, ID DESC 370 // accepts one or more columns, with or without ASC/DESC, and also accepts RAND() 371 function sanitize_sql_orderby( $orderby ){ 372 preg_match('/^\s*([a-z0-9_]+(\s+(ASC|DESC))?(\s*,\s*|\s*$))+|^\s*RAND\(\s*\)\s*$/i', $orderby, $obmatches); 373 if ( !$obmatches ) 374 return false; 375 return $orderby; 367 376 } 368 377
Note: See TracChangeset
for help on using the changeset viewer.