websetup: Fix bug in array change detection.
authorJoey Hess <joey@gnu.kitenet.net>
Sat, 9 Jan 2010 21:27:08 +0000 (16:27 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Sat, 9 Jan 2010 21:27:08 +0000 (16:27 -0500)
IkiWiki/Plugin/websetup.pm
debian/changelog

index 75aa3681c2e68744f850b39f806cbbd329d55d97..e477bcc20dad42ed2f505f0936b82d93c3271ae9 100644 (file)
@@ -362,7 +362,11 @@ sub showform ($$) {
                                @value=sort grep { length $_ } @value;
                                my @oldvalue=sort grep { length $_ }
                                        (defined $config{$key} ? @{$config{$key}} : ());
-                               if ((@oldvalue) == (@value)) {
+                               my $same=(@oldvalue) == (@value);
+                               for (my $x=0; $same && $x < @value; $x++) {
+                                       $same=0 if $value[$x] ne $oldvalue[$x];
+                               }
+                               if ($same) {
                                        delete $rebuild{$field};
                                }
                                else {
index 5d5cdd564ca69593170c27da8ce8b97e90fe422f..bd638b36f12f34b70272c75ef1146b042eda4e99 100644 (file)
@@ -7,6 +7,7 @@ ikiwiki (3.20100104) UNRELEASED; urgency=low
   * comments: Fix permalinks for comments using new conflict-free filenames.
   * img: Support alignment of images with captions. (Giuseppe Bilotta)
   * websetup: Fix utf-8 problems.
+  * websetup: Fix bug in array change detection.
 
  -- Joey Hess <joeyh@debian.org>  Mon, 04 Jan 2010 12:53:24 -0500