From aed16b4833f98eda566f75b6a1a679febc1ba5ff Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Jan 2010 12:54:18 -0500 Subject: [PATCH] inline: Avoid showing edit links if page editing is disabled. (Sjoerd) --- IkiWiki/Plugin/inline.pm | 5 ++++- debian/changelog | 7 +++++++ ...plugin_sets_editurl_even_when_editpage_is_disabled.html | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index ec99300b3..401852513 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -369,9 +369,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)); + } } diff --git a/debian/changelog b/debian/changelog index 02d3ec65b..df3490640 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ikiwiki (3.20100104) UNRELEASED; urgency=low + + * inline: Avoid showing edit links if page editing is disabled. + (Sjoerd) + + -- Joey Hess Mon, 04 Jan 2010 12:53:24 -0500 + ikiwiki (3.20100102.3) unstable; urgency=low Happy palindrome day! diff --git a/doc/bugs/inline_plugin_sets_editurl_even_when_editpage_is_disabled.html b/doc/bugs/inline_plugin_sets_editurl_even_when_editpage_is_disabled.html index e4e37b34a..62c91a932 100644 --- a/doc/bugs/inline_plugin_sets_editurl_even_when_editpage_is_disabled.html +++ b/doc/bugs/inline_plugin_sets_editurl_even_when_editpage_is_disabled.html @@ -12,3 +12,5 @@ see subject, simple patch below } } + +[[done]] --[[Joey]] -- 2.39.5