[dw-free] Creating new tags makes all tags disappear from an entry when tag limit exceeded
[commit: http://hg.dwscoalition.org/dw-free/rev/0532379eaa08]
http://bugs.dwscoalition.org/show_bug.cgi?id=1258
Handle tag errors gracefully when posting an entry.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=1258
Handle tag errors gracefully when posting an entry.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/ljprotocol.pl
-------------------------------------------------------------------------------- diff -r fbde25c78d1b -r 0532379eaa08 cgi-bin/ljprotocol.pl --- a/cgi-bin/ljprotocol.pl Sun Jun 14 18:35:44 2009 +0000 +++ b/cgi-bin/ljprotocol.pl Sun Jun 14 18:42:44 2009 +0000 @@ -1438,9 +1438,11 @@ sub postevent # slightly misnamed, the taglist is/was normally a string, but now can also be an arrayref. my $taginput = $req->{props}->{taglist}; + my $tagerr = ""; my $logtag_opts = { remote => $u, ignore_max => $flags->{ignore_tags_max} ? 1 : 0, + err_ref => \$tagerr, }; if (ref $taginput eq 'ARRAY') { @@ -1451,6 +1453,7 @@ sub postevent } my $rv = LJ::Tags::update_logtags($uowner, $jitemid, $logtag_opts); + return fail($err,157,$tagerr) unless $rv; } # meta-data --------------------------------------------------------------------------------