summaryrefslogtreecommitdiff
path: root/ikiwiki-transition
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2008-12-31 14:54:22 -0500
committerJoey Hess <joey@gnu.kitenet.net>2008-12-31 14:54:22 -0500
commit794dbd24767c8ca856af22d280e3ce3a41e0d8d7 (patch)
tree23db9b50221016eba9678ec9554b72ad0856e917 /ikiwiki-transition
parent2b0473f09056120337637676f8f54bcd68c63442 (diff)
fix moveprefs transition
Diffstat (limited to 'ikiwiki-transition')
-rwxr-xr-xikiwiki-transition13
1 files changed, 9 insertions, 4 deletions
diff --git a/ikiwiki-transition b/ikiwiki-transition
index b15d9f46b..599261a09 100755
--- a/ikiwiki-transition
+++ b/ikiwiki-transition
@@ -201,10 +201,15 @@ sub moveprefs {
foreach my $admin (@{$config{adminuser}}) {
my $a=IkiWiki::userinfo_get($admin, $field);
if (defined $a && length $a &&
- $a ne $orig && # might already have been moved
- defined $config{$field} &&
- length $config{$field}) {
- $config{$field}=IkiWiki::pagespec_merge($config{$field}, $a);
+ # might already have been moved
+ (! defined $orig || $a ne $orig)) {
+ if (defined $config{$field} &&
+ length $config{$field}) {
+ $config{$field}=IkiWiki::pagespec_merge($config{$field}, $a);
+ }
+ else {
+ $config{$field}=$a;
+ }
}
}
}