From 0bb8c84446f574b6ee0903d1ccf7733d185c3f39 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 15 Jun 2006 08:18:04 +0000 Subject: [PATCH] Update opml. git-svn-id: https://develop.svn.wordpress.org/trunk@3875 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-links-opml.php | 67 ++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 39 deletions(-) diff --git a/wp-links-opml.php b/wp-links-opml.php index 848a9986e2..ea656b8a8e 100644 --- a/wp-links-opml.php +++ b/wp-links-opml.php @@ -1,61 +1,50 @@ -links.link_category = $link_cat"; - $cat_name = $wpdb->get_var("SELECT $wpdb->linkcategories.cat_name FROM $wpdb->linkcategories WHERE $wpdb->linkcategories.cat_id = $link_cat"); - if (!empty($cat_name)) { - $cat_name = ": category $cat_name"; - } - } + $link_cat = '' . urldecode($link_cat) . ''; + $link_cat = intval($link_cat); } ?>\n"; ?> - + Links for <?php echo get_bloginfo('name').$cat_name ?> GMT -links.link_url, link_rss, $wpdb->links.link_name, $wpdb->links.link_category, $wpdb->linkcategories.cat_name, link_updated -FROM $wpdb->links - JOIN $wpdb->linkcategories on $wpdb->links.link_category = $wpdb->linkcategories.cat_id - AND $wpdb->links.link_visible = 'Y' - $sql_cat - ORDER BY $wpdb->linkcategories.cat_name, $wpdb->links.link_name \n"; - //echo(""); - $prev_cat_id = 0; - $results = $wpdb->get_results($sql); - if ($results) { - foreach ($results as $result) { - if ($result->link_category != $prev_cat_id) { // new category - if ($prev_cat_id != 0) { // not first time -?> - - + link_category; - } // end if new category + + $bookmarks = get_bookmarks("category={$cat->cat_ID}"); + foreach ((array) $bookmarks as $bookmark) { ?> - + - + \ No newline at end of file