mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-12-01 02:40 am

[dw-free] OPML file should special case feeds accounts

[commit: http://hg.dwscoalition.org/dw-free/rev/cccd5b159b9f]

http://bugs.dwscoalition.org/show_bug.cgi?id=2013

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

Patch by [personal profile] afuna.

Files modified:
  • htdocs/tools/opml.bml
--------------------------------------------------------------------------------
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";
     }
 
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org