Back compat fixes for get_links().

git-svn-id: https://develop.svn.wordpress.org/trunk@3606 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-03-04 20:39:51 +00:00
parent 241fd10669
commit 31dded8a36
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;