]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/websetup.pm
Let tests determine whether feeds get made.
[git.ikiwiki.info.git] / IkiWiki / Plugin / websetup.pm
index 9c032fdc6780884c86b13bdece90a9f972efc7f1..f95017c90d71a6408dbd81028fcb15b32c7a3265 100644 (file)
@@ -151,7 +151,10 @@ sub showfields ($$$@) {
                my %info=%{shift @show};
 
                my $description=$info{description};
                my %info=%{shift @show};
 
                my $description=$info{description};
-               if (exists $info{link} && length $info{link}) {
+               if (exists $info{htmldescription}) {
+                       $description=$info{htmldescription};
+               }
+               elsif (exists $info{link} && length $info{link}) {
                        if ($info{link} =~ /^\w+:\/\//) {
                                $description="<a href=\"$info{link}\">$description</a>";
                        }
                        if ($info{link} =~ /^\w+:\/\//) {
                                $description="<a href=\"$info{link}\">$description</a>";
                        }
@@ -288,7 +291,7 @@ sub showform ($$) {
                fieldsets => [
                        [main => gettext("main")], 
                ],
                fieldsets => [
                        [main => gettext("main")], 
                ],
-               action => $config{cgiurl},
+               action => IkiWiki::cgiurl(),
                template => {type => 'div'},
                stylesheet => 1,
        );
                template => {type => 'div'},
                stylesheet => 1,
        );
@@ -344,7 +347,7 @@ sub showform ($$) {
        IkiWiki::decode_form_utf8($form);
        
        if ($form->submitted eq "Cancel") {
        IkiWiki::decode_form_utf8($form);
        
        if ($form->submitted eq "Cancel") {
-               IkiWiki::redirect($cgi, $config{url});
+               IkiWiki::redirect($cgi, IkiWiki::baseurl(undef));
                return;
        }
        elsif (($form->submitted eq 'Save Setup' || $form->submitted eq 'Rebuild Wiki') && $form->validate) {
                return;
        }
        elsif (($form->submitted eq 'Save Setup' || $form->submitted eq 'Rebuild Wiki') && $form->validate) {
@@ -447,10 +450,10 @@ sub showform ($$) {
                        IkiWiki::saveindex();
                        IkiWiki::unlockwiki();
 
                        IkiWiki::saveindex();
                        IkiWiki::unlockwiki();
 
-                       # Print the top part of a standard misctemplate,
+                       # Print the top part of a standard cgitemplate,
                        # then show the rebuild or refresh, live.
                        my $divider="\0";
                        # then show the rebuild or refresh, live.
                        my $divider="\0";
-                       my $html=IkiWiki::misctemplate("setup", $divider);
+                       my $html=IkiWiki::cgitemplate($cgi, "setup", $divider);
                        IkiWiki::printheader($session);
                        my ($head, $tail)=split($divider, $html, 2);
                        print $head."<pre>\n";
                        IkiWiki::printheader($session);
                        my ($head, $tail)=split($divider, $html, 2);
                        print $head."<pre>\n";