aboutsummaryrefslogtreecommitdiff
path: root/ikiwiki-transition
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-08-05 21:02:18 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-08-05 21:02:18 -0400
commit11a4ad8a4da24594f85df7f70915ce5743d1b949 (patch)
tree20af94e78cfba53a32fce44d5abe2369c48a21f1 /ikiwiki-transition
parentea6dc3832585d8aca784c21d6f91436848a45039 (diff)
downloadikiwiki-11a4ad8a4da24594f85df7f70915ce5743d1b949.tar
ikiwiki-11a4ad8a4da24594f85df7f70915ce5743d1b949.tar.gz
add a guard against multiple cgi or rcs wrappers
Diffstat (limited to 'ikiwiki-transition')
-rwxr-xr-xikiwiki-transition10
1 files changed, 10 insertions, 0 deletions
diff --git a/ikiwiki-transition b/ikiwiki-transition
index a257347a1..e42a5137c 100755
--- a/ikiwiki-transition
+++ b/ikiwiki-transition
@@ -130,14 +130,24 @@ sub setupformat {
IkiWiki::checkconfig();
# unpack old-format wrappers setting into new fields
+ my $cgi_seen=0;
+ my $rcs_seen=0;
foreach my $wrapper (@{$config{wrappers}}) {
if ($wrapper->{cgi}) {
+ if ($cgi_seen) {
+ die "don't know what to do with second cgi wrapper ".$wrapper->{wrapper}."\n";
+ }
+ $cgi_seen++;
print "setting cgi_wrapper to ".$wrapper->{wrapper}."\n";
$config{cgi_wrapper}=$wrapper->{wrapper};
$config{cgi_wrappermode}=$wrapper->{wrappermode}
if exists $wrapper->{wrappermode};
}
elsif ($config{rcs}) {
+ if ($rcs_seen) {
+ die "don't know what to do with second rcs wrapper ".$wrapper->{wrapper}."\n";
+ }
+ $rcs_seen++;
print "setting $config{rcs}_wrapper to ".$wrapper->{wrapper}."\n";
$config{$config{rcs}."_wrapper"}=$wrapper->{wrapper};
$config{$config{rcs}."_wrappermode"}=$wrapper->{wrappermode}