kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2010-06-14 02:10 am

[dw-free] Lack warning when posting a new entry, and no privs to add a new tag

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

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

If submitting an entry with a new tag to a community that won't accept new
tags from that poster, notify the poster that the new tag wasn't added to
the entry, even though the entry otherwise posted successfully.

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/ljprotocol.pl
--------------------------------------------------------------------------------
diff -r 5a4af5b06631 -r 89aa661f45d2 cgi-bin/ljprotocol.pl
--- a/cgi-bin/ljprotocol.pl	Sun Jun 13 20:13:02 2010 -0500
+++ b/cgi-bin/ljprotocol.pl	Sun Jun 13 21:10:32 2010 -0500
@@ -1526,6 +1526,8 @@ sub postevent
 
         my $rv = LJ::Tags::update_logtags($uowner, $jitemid, $logtag_opts);
         return fail($err,157,$tagerr) unless $rv;
+        # the next line will propagate any "skippable" errors
+        $res->{message} = $tagerr if $tagerr;
     }
 
     # meta-data
--------------------------------------------------------------------------------