OSDN Git Service

PKWK_READONLY prohibits editing
authorhenoheno <henoheno>
Sun, 23 Jan 2005 05:22:25 +0000 (14:22 +0900)
committerhenoheno <henoheno>
Sun, 23 Jan 2005 05:22:25 +0000 (14:22 +0900)
plugin/edit.inc.php

index 995d34f..3edc2d0 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: edit.inc.php,v 1.29 2004/12/14 14:14:02 henoheno Exp $
+// $Id: edit.inc.php,v 1.30 2005/01/23 05:22:25 henoheno Exp $
 //
 // Edit plugin
 // cmd=edit
@@ -9,6 +9,8 @@ function plugin_edit_action()
 {
        global $vars, $_title_edit, $load_template_func;
 
+       if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing');
+
        $page = isset($vars['page']) ? $vars['page'] : '';
 
        check_editable($page, true, true);
@@ -79,6 +81,8 @@ function plugin_edit_inline()
 
        global $script, $vars, $fixed_heading_anchor_edit;
 
+       if (PKWK_READONLY) return ''; // Show nothing 
+
        // Arguments
        $args = func_get_args();
        $s_label = array_pop($args); // {label}