fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-08-24 11:13 am

[dw-free] Feeds: provide link to feed account when account already exists

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

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

Add the user tags to the error message when the feed name is already in use.

Patch by [personal profile] yvi.

Files modified:
  • htdocs/feeds/index.bml
  • htdocs/feeds/index.bml.text
--------------------------------------------------------------------------------
diff -r c3bbfdeafd16 -r 438eb54763e4 htdocs/feeds/index.bml
--- a/htdocs/feeds/index.bml	Wed Aug 24 19:07:13 2011 +0800
+++ b/htdocs/feeds/index.bml	Wed Aug 24 19:13:07 2011 +0800
@@ -143,9 +143,10 @@
                                                           'user'    => $acct,
                                                           'feedurl' => $syn_url,
                                                           );
-
-                return "<?h1 $ML{'.invalid.inuse.title'} h1?><?p $ML{'.invalid.inuse.text'} p?>"
-                    unless $synfeed;
+                unless ( $synfeed ) {
+                    my $u = LJ::load_user( $acct );
+                    return "<?h1 $ML{'.invalid.inuse.title'} h1?><?p " . BML::ml( '.invalid.inuse.text2', { 'user' => $u->ljuser_display } ) . " p?>"
+                }
 
                 $su = $dbh->selectrow_hashref("SELECT u.user, s.* FROM syndicated s, useridmap u ".
                                               "WHERE s.userid=? AND s.userid=u.userid",
diff -r c3bbfdeafd16 -r 438eb54763e4 htdocs/feeds/index.bml.text
--- a/htdocs/feeds/index.bml.text	Wed Aug 24 19:07:13 2011 +0800
+++ b/htdocs/feeds/index.bml.text	Wed Aug 24 19:13:07 2011 +0800
@@ -33,7 +33,7 @@
 
 .invalid.http.title=Error retrieving content
 
-.invalid.inuse.text=That account name is already in use.
+.invalid.inuse.text2=The account [[user]] already exists.
 
 .invalid.inuse.title=That account name is already in use.
 
--------------------------------------------------------------------------------

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