summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhttp://puck.openid.org/ <http://puck.openid.org/@web>2008-12-22 23:14:15 -0500
committerJoey Hess <joey@kitenet.net>2008-12-22 23:14:15 -0500
commit02da7ec599df4f4fb4dfc2b793147d6ed82cebfc (patch)
tree22ecd5a2ea1712bb2885d31c04126a0f08597fbd
parent8dc052a1ce59d246713c5c66d8f25145f9f41f25 (diff)
-rw-r--r--doc/todo/Allow_disabling_edit_and_preferences_links.mdwn27
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/todo/Allow_disabling_edit_and_preferences_links.mdwn b/doc/todo/Allow_disabling_edit_and_preferences_links.mdwn
new file mode 100644
index 000000000..10eae35a7
--- /dev/null
+++ b/doc/todo/Allow_disabling_edit_and_preferences_links.mdwn
@@ -0,0 +1,27 @@
+This patch allows disabling the edit and preferences link in the config file. It is backwards compatible (so peoples edit and preferences links won't suddenly vanish).
+
+To disable edit or prefs respectively, add the following to the config file:
+
+<pre>
+ 'edit' => 0,
+ 'prefs' => 0,
+</pre>
+
+Patch:
+<pre>
+--- /usr/share/perl5/IkiWiki/Render.pm.orig 2008-12-23 16:49:00.000000000 +1300
++++ /usr/share/perl5/IkiWiki/Render.pm 2008-12-23 16:55:40.000000000 +1300
+@@ -80,8 +80,10 @@
+ my $actions=0;
+
+ if (length $config{cgiurl}) {
+- $template->param(editurl => cgiurl(do => "edit", page => $page));
+- $template->param(prefsurl => cgiurl(do => "prefs"));
++ $template->param(editurl => cgiurl(do => "edit", page => $page))
++ if ! defined $config{edit} || (defined $config{edit} && $config{edit} == 1);
++ $template->param(prefsurl => cgiurl(do => "prefs"))
++ if ! defined $config{prefs} || (defined $config{prefs} && $config{prefs} == 1);
+ $actions++;
+ }
+
+</pre>