]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Avoid creating edit links when not in cgi mode.
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 23 Dec 2006 06:18:55 +0000 (06:18 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 23 Dec 2006 06:18:55 +0000 (06:18 +0000)
* Avoid displaying discussion links at all, if there's not a discussion
  page, when not in cgi mode.

IkiWiki.pm
IkiWiki/Render.pm
debian/changelog
doc/bugs/__63__Discussion_when_not_CGI_mode.mdwn

index 9f6c3bb1f95557dfc0577e6d8fcf9a7ab759651e..b8f3e7a55dcefb0c39aba10f5b2773d7beafadbb 100644 (file)
@@ -413,6 +413,7 @@ sub htmllink ($$$;$$$) { #{{{
                $bestlink=htmlpage($bestlink);
        }
        if (! grep { $_ eq $bestlink } map { @{$_} } values %renderedfiles) {
                $bestlink=htmlpage($bestlink);
        }
        if (! grep { $_ eq $bestlink } map { @{$_} } values %renderedfiles) {
+               return $linktext unless $config{cgi};
                return "<span><a href=\"".
                        cgiurl(do => "create", page => lc($link), from => $page).
                        "\">?</a>$linktext</span>"
                return "<span><a href=\"".
                        cgiurl(do => "create", page => lc($link), from => $page).
                        "\">?</a>$linktext</span>"
index 4033468b23a7917aadc01c0fd9fc9fed416c4573..6d19a1dd307d85bef13eff457651e5d95e0bca41 100644 (file)
@@ -93,7 +93,7 @@ sub genpage ($$$) { #{{{
                $template->param(historyurl => $u);
                $actions++;
        }
                $template->param(historyurl => $u);
                $actions++;
        }
-       if ($config{discussion}) {
+       if ($config{discussion} && ($config{cgi} || exists $links{"$page/discussion"})) {
                $template->param(discussionlink => htmllink($page, $page, "Discussion", 1, 1));
                $actions++;
        }
                $template->param(discussionlink => htmllink($page, $page, "Discussion", 1, 1));
                $actions++;
        }
index 59bd097f1ad83adeebf07682e193fbee1939d427..d0fb28093668ca896046276009cfe02b659d158f 100644 (file)
@@ -3,8 +3,11 @@ ikiwiki (1.37) UNRELEASED; urgency=low
   * Add mirrorlist plugin.
   * Fixed permissions of some files that were 600 in the tarball. (Did not
     affect the deb).
   * Add mirrorlist plugin.
   * Fixed permissions of some files that were 600 in the tarball. (Did not
     affect the deb).
+  * Avoid creating edit links when not in cgi mode.
+  * Avoid displaying discussion links at all, if there's not a discussion
+    page, when not in cgi mode.
 
 
- -- Joey Hess <joeyh@debian.org>  Sat, 23 Dec 2006 00:49:16 -0500
+ -- Joey Hess <joeyh@debian.org>  Sat, 23 Dec 2006 01:17:54 -0500
 
 ikiwiki (1.36) unstable; urgency=low
 
 
 ikiwiki (1.36) unstable; urgency=low
 
index f4437c3dcb0164dfe8d96c95b39fc59d138b7197..e08abaff3023326abf9372f5c0b880b37e59f3dc 100644 (file)
@@ -4,4 +4,6 @@ But I did have a "?Discussion" link still and that is CGI.
 
 So the bug (I think) is that it has a hyperlink to a CGI when CGI is not enabled.
 
 
 So the bug (I think) is that it has a hyperlink to a CGI when CGI is not enabled.
 
-(Note that my title above has _63_ but was supposed to be a question mark.)
\ No newline at end of file
+> [[bugs/done]] -- [[Joey]]
+
+(Note that my title above has _63_ but was supposed to be a question mark.)