Back compat fixes for get_links().

git-svn-id: http://svn.automattic.com/wordpress/trunk@3606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-03-04 20:39:51 +00:00
parent 150bb1dcee
commit 91621266c1
1 changed files with 7 additions and 1 deletions

View File

@ -72,7 +72,13 @@ function get_links($category = -1,
global $wpdb;
$results = get_bookmarks("category=$category&orderby=$orderby&show_updated=$show_updated&limit=$limit");
$order = 'ASC';
if (substr($orderby, 0, 1) == '_') {
$order = 'DESC';
$orderby = substr($orderby, 1);
}
$results = get_bookmarks("category=$category&orderby=$orderby&order=$order&show_updated=$show_updated&limit=$limit");
if (!$results) {
return;