Don't throw an error if we aren't actually trying to define tags.
Patch by kareila.
diffs (37 lines):
diff -r eef334d67be8 -r cdc29a206198 bin/upgrading/en.dat
--- a/bin/upgrading/en.dat Sun Jun 28 01:47:04 2009 +0000
+++ b/bin/upgrading/en.dat Sun Jun 28 03:35:57 2009 +0000
@@ -3373,6 +3373,8 @@ subscribe_interface.save=Save
subscribe_interface.special_subs.note=These notification options are only
available by email and will not show in your [[sitenameabbrev]] Inbox.
+taglib.error.access=You are not allowed to tag entries in this journal.
+
taglib.error.invalid=The following tag name is invalid: [[tagname]]
taglib.error.nomerge=The tag name '[[tagname]]' is already in use. Merging
tags is not supported at this time.
diff -r eef334d67be8 -r cdc29a206198 cgi-bin/ljprotocol.pl
--- a/cgi-bin/ljprotocol.pl Sun Jun 28 01:47:04 2009 +0000
+++ b/cgi-bin/ljprotocol.pl Sun Jun 28 03:35:57 2009 +0000
@@ -1434,7 +1434,7 @@ sub postevent
}
# Entry tags
- if ($req->{props} && defined $req->{props}->{taglist}) {
+ if ( $req->{props} && defined $req->{props}->{taglist} &&
$req->{props}->{taglist} ne '' ) {
# slightly misnamed, the taglist is/was normally a string, but now can
also be an arrayref.
my $taginput = $req->{props}->{taglist};
diff -r eef334d67be8 -r cdc29a206198 cgi-bin/taglib.pl
--- a/cgi-bin/taglib.pl Sun Jun 28 01:47:04 2009 +0000
+++ b/cgi-bin/taglib.pl Sun Jun 28 03:35:57 2009 +0000
@@ -704,7 +704,8 @@ sub update_logtags {
my $can_add = $can_control || LJ::Tags::can_add_tags($u, $remote);
# bail out early if we can't do any actions
- return undef unless $can_add || $opts->{force};
+ return $err->( LJ::Lang::ml( 'taglib.error.access' ) )
+ unless $can_add || $opts->{force};
# load the user's tags
my $utags = LJ::Tags::get_usertags($u);
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog