OSDN Git Service

PKWK_READONLY prohibits editing
authorhenoheno <henoheno>
Sun, 23 Jan 2005 08:29:20 +0000 (17:29 +0900)
committerhenoheno <henoheno>
Sun, 23 Jan 2005 08:29:20 +0000 (17:29 +0900)
plugin/template.inc.php
plugin/tracker.inc.php

index 09eb7be..ea29aba 100644 (file)
@@ -1,5 +1,7 @@
 <?php
-// $Id: template.inc.php,v 1.19 2004/10/09 09:05:33 henoheno Exp $
+// $Id: template.inc.php,v 1.20 2005/01/23 08:25:16 henoheno Exp $
+//
+// Load template plugin
 
 define('MAX_LEN', 60);
 
@@ -11,12 +13,13 @@ function plugin_template_action()
        global $_btn_template_create, $_title_template;
        global $_err_template_already, $_err_template_invalid, $_msg_template_force;
 
+       if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing');
        if (! isset($vars['refer']) || ! is_page($vars['refer']))
                return FALSE;
 
        $lines = get_source($vars['refer']);
 
-       // #freeze¤òºï½ü
+       // Remove '#freeze'
        if (! empty($lines) && strtolower(rtrim($lines[0])) == '#freeze')
                array_shift($lines);
 
index 1612b03..eca6e0a 100644 (file)
@@ -1,9 +1,8 @@
 <?php
-/////////////////////////////////////////////////
-// PukiWiki - Yet another WikiWikiWeb clone.
-//
-// $Id: tracker.inc.php,v 1.27 2005/01/15 09:35:58 henoheno Exp $
+// PukiWiki - Yet another WikiWikiWeb clone
+// $Id: tracker.inc.php,v 1.28 2005/01/23 08:29:20 henoheno Exp $
 //
+// Issue tracker plugin (See Also bugtrack plugin)
 
 // tracker_list¤Çɽ¼¨¤·¤Ê¤¤¥Ú¡¼¥¸Ì¾(Àµµ¬É½¸½¤Ç)
 // 'SubMenu'¥Ú¡¼¥¸ ¤ª¤è¤Ó '/'¤ò´Þ¤à¥Ú¡¼¥¸¤ò½ü³°¤¹¤ë
@@ -18,6 +17,8 @@ function plugin_tracker_convert()
 {
        global $script,$vars;
 
+       if (PKWK_READONLY) return ''; // Show nothing
+
        $base = $refer = $vars['page'];
 
        $config_name = 'default';
@@ -81,6 +82,8 @@ function plugin_tracker_action()
 {
        global $post, $vars, $now;
 
+       if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing');
+
        $config_name = array_key_exists('_config',$post) ? $post['_config'] : '';
 
        $config = new Config('plugin/tracker/'.$config_name);
@@ -180,6 +183,8 @@ function plugin_tracker_inline()
 {
        global $vars;
 
+       if (PKWK_READONLY) return ''; // Show nothing
+
        $args = func_get_args();
        if (count($args) < 3)
        {