Small code formatting tweak

git-svn-id: http://svn.automattic.com/wordpress/trunk@6986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-02-22 20:48:28 +00:00
parent b49ff57e63
commit 699b250926

View File

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