OSDN Git Service

BugTrack/2420 AutoTicketLink - Improve regex and JSON encode
[pukiwiki/pukiwiki.git] / plugin / read.inc.php
index 5614903..1e4ec71 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: read.inc.php,v 1.9 2011/01/25 15:01:01 henoheno Exp $
+// read.inc.php
+// Copyright 2003-2017 PukiWiki Development Team
+// License: GPL v2 or (at your option) any later version
 //
 // Read plugin: Show a page and InterWiki
 
@@ -9,22 +11,22 @@ function plugin_read_action()
        global $vars, $_title_invalidwn, $_msg_invalidiwn;
 
        $page = isset($vars['page']) ? $vars['page'] : '';
-
        if (is_page($page)) {
-               // ページを表示
+               // Show this page
                check_readable($page, true, true);
                header_lastmod($page);
+               is_pagelist_cache_enabled(true); // Enable get_existpage() cache
                return array('msg'=>'', 'body'=>'');
 
        } else if (! PKWK_SAFE_MODE && is_interwiki($page)) {
-               return do_plugin_action('interwiki'); // InterWikiNameを処理
+               return do_plugin_action('interwiki'); // Process InterWikiName
 
        } else if (is_pagename($page)) {
                $vars['cmd'] = 'edit';
-               return do_plugin_action('edit'); // 存在しないので、編集フォームを表示
+               return do_plugin_action('edit'); // Page not found, then show edit form
 
        } else {
-               // 無効なページ名
+               // Invalid page name
                return array(
                        'msg'=>$_title_invalidwn,
                        'body'=>str_replace('$1', htmlsc($page),
@@ -32,4 +34,3 @@ function plugin_read_action()
                );
        }
 }
-?>