Error message for renaming to multiple tags.

        Patch by kareila. 

diffs (25 lines):

diff -r 4f64074511e9 -r b84fd197f8fb htdocs/manage/tags.bml
--- a/htdocs/manage/tags.bml    Mon May 25 01:18:17 2009 +0800
+++ b/htdocs/manage/tags.bml    Tue May 26 17:47:57 2009 +0000
@@ -61,7 +61,8 @@ HEAD
         if ($POST{rename}) {
             my @tagnames = map { s/\d+_//; $_; } split /\0/, $POST{tags};
             my $new_tag = LJ::trim($POST{rename_field});
-            $new_tag =~ s/,.*//;
+            return LJ::bad_input( $ML{'.error.rename.multiple'} )
+                if $new_tag =~ /,/;
 
             # FIXME: merge support later
             my $tagerr = "";
diff -r 4f64074511e9 -r b84fd197f8fb htdocs/manage/tags.bml.text
--- a/htdocs/manage/tags.bml.text       Mon May 25 01:18:17 2009 +0800
+++ b/htdocs/manage/tags.bml.text       Tue May 26 17:47:57 2009 +0000
@@ -12,6 +12,8 @@
 .confirm.delete=Are you sure you want to remove the selected tags? This 
operation is not reversible.
 
 .error.invalidsettings=Invalid selection for tag permission settings.
+
+.error.rename.multiple=You cannot rename a tag to multiple tags. Please go 
back and remove any commas from the new tag name.
 
 .hint.create=You can create multiple tags by separating them with commas.
 
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to