Fixed typos

git-svn-id: http://svn.automattic.com/wordpress/trunk@402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
emc3 2003-10-01 14:38:10 +00:00
parent ad7545eff1
commit c8bc513d23

View File

@ -178,14 +178,14 @@ if (empty($orderby)) {
$orderby = urldecode($orderby); $orderby = urldecode($orderby);
$orderby = addslashes_gpc($orderby); $orderby = addslashes_gpc($orderby);
$orderby_array = explode(' ',$orderby); $orderby_array = explode(' ',$orderby);
if (!in_array($orderby_array[0],$allowed_keys) { if (!in_array($orderby_array[0],$allowed_keys)) {
$orderby_array[0] = 'date'; $orderby_array[0] = 'date';
} }
$orderby = $orderby_array[0].' '.$order; $orderby = $orderby_array[0].' '.$order;
if (count($orderby_array)>1) { if (count($orderby_array)>1) {
for ($i = 1; $i < (count($orderby_array)); $i = $i + 1) { for ($i = 1; $i < (count($orderby_array)); $i = $i + 1) {
// Only allow certain values for safety // Only allow certain values for safety
if (in_array($orderby_array[$i],$allowed_keys) { if (in_array($orderby_array[$i],$allowed_keys)) {
$orderby .= ',post_'.$orderby_array[$i].' '.$order; $orderby .= ',post_'.$orderby_array[$i].' '.$order;
} }
} }