Use the original syndicated URL in OPML files, not the Dreamwidth URL. 
Removes a level of indirection that isn't needed.

        Patch by afuna. 

diffs (40 lines):

diff -r c41810298e06 -r cccd5b159b9f htdocs/tools/opml.bml
--- a/htdocs/tools/opml.bml     Tue Dec 01 02:38:56 2009 +0000
+++ b/htdocs/tools/opml.bml     Tue Dec 01 02:40:48 2009 +0000
@@ -71,19 +71,25 @@
             # returns empty here, though it's used in userinfo.bml
             $title = $w->{name};
         }
- 
-        my $feed = $w->journal_base;
+
+        my $feed;
+
+        if ( $w->is_syndicated ) { 
+            my $synd = $w->get_syndicated;
+            $feed = $synd->{synurl};
+        } else {
+            $feed = $w->journal_base;
         
-        if( $GET{feed} eq "atom" ) {
-            $feed .= "/data/atom";
-        } else {
-            $feed .= "/data/rss";
+            if( $GET{feed} eq "atom" ) {
+                $feed .= "/data/atom";
+            } else {
+                $feed .= "/data/rss";
+            }
+
+            if( $GET{auth} eq "digest" ) {
+                $feed .= "?auth=digest";
+            }
         }
-
-        if( $GET{auth} eq "digest" ) {
-            $feed .= "?auth=digest";
-        }
-
         $x .= "<outline text=\"" . LJ::exml($title) . "\" xmlURL=\"" . 
LJ::exml($feed) . "\" />\n";
     }
 
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to