]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/inline.pm
Better URL for my Ikiwiki instance; changed the note about DNS.
[ikiwiki.git] / IkiWiki / Plugin / inline.pm
index 29729a4147412a3a6d423d0403e6b21f9f80f1b1..44919e58c35d658535fbb6e8e2e6f745e3c69311 100644 (file)
@@ -49,6 +49,7 @@ sub getsetup () {
                plugin => {
                        safe => 1,
                        rebuild => undef,
+                       section => "core",
                },
                rss => {
                        type => "boolean",
@@ -209,7 +210,7 @@ sub preprocess_inline (@) {
                if ($params{show}) {
                        $num=$params{show};
                }
-               if ($params{feedshow} && $num < $params{feedshow}) {
+               if ($params{feedshow} && $num < $params{feedshow} && $num > 0) {
                        $num=$params{feedshow};
                }
                if ($params{skip} && $num) {
@@ -357,9 +358,9 @@ sub preprocess_inline (@) {
                                        my $file = $pagesources{$page};
                                        my $type = pagetype($file);
                                        if ($config{discussion}) {
-                                               if ($page !~ /.*\/\Q$config{discussionpage}\E$/ &&
+                                               if ($page !~ /.*\/\Q$config{discussionpage}\E$/i &&
                                                    (length $config{cgiurl} ||
-                                                    exists $links{$page."/".$config{discussionpage}})) {
+                                                    exists $pagesources{$page."/".lc($config{discussionpage})})) {
                                                        $template->param(have_actions => 1);
                                                        $template->param(discussionlink =>
                                                                htmllink($page,
@@ -369,9 +370,12 @@ sub preprocess_inline (@) {
                                                                        forcesubpage => 1));
                                                }
                                        }
-                                       if (length $config{cgiurl} && defined $type) {
+                                       if (length $config{cgiurl} &&
+                                           defined $type &&
+                                           IkiWiki->can("cgi_editpage")) {
                                                $template->param(have_actions => 1);
                                                $template->param(editurl => cgiurl(do => "edit", page => $page));
+
                                        }
                                }