diff options
-rw-r--r-- | doc/tips/upgrade_to_3.0.mdwn | 2 | ||||
-rwxr-xr-x | ikiwiki-transition | 13 |
2 files changed, 10 insertions, 5 deletions
diff --git a/doc/tips/upgrade_to_3.0.mdwn b/doc/tips/upgrade_to_3.0.mdwn index a9664dfc3..8adc040a1 100644 --- a/doc/tips/upgrade_to_3.0.mdwn +++ b/doc/tips/upgrade_to_3.0.mdwn @@ -21,7 +21,7 @@ setup file, and will no longer appear on the admin preferences page once your wiki is upgraded to 3.0. You can move these preferences into the setup file by running -`ikiwiki-transition moveprefs your.setup` +`ikiwiki-transition moveprefs your.setup; ikiwiki -setup your.setup -refresh -wrappers` (Make sure you have converted the setup file to the new format first.) 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; + } } } } |