Small code formatting tweak

git-svn-id: https://develop.svn.wordpress.org/trunk@6986 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-02-22 20:48:28 +00:00
parent fef755b796
commit 47cec19e53
1 changed files with 2 additions and 3 deletions

View File

@ -1190,10 +1190,9 @@ class WP_Query {
if ( in_array($orderby_array[$i], $allowed_keys) )
$q['orderby'] .= (($i == 0) ? '' : ',') . $orderby;
}
/* append ASC or DESC at the end */
if ( !empty($q['orderby'])){
// append ASC or DESC at the end
if ( !empty($q['orderby']))
$q['orderby'] .= " {$q['order']}";
}
if ( empty($q['orderby']) )
$q['orderby'] = 'post_date '.$q['order'];