Handle tag errors gracefully when posting an entry.
Patch by kareila.
diffs (23 lines):
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
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog