<?php
-/////////////////////////////////////////////////
// PukiWiki - Yet another WikiWikiWeb clone.
+// read.inc.php
+// Copyright 2003-2017 PukiWiki Development Team
+// License: GPL v2 or (at your option) any later version
//
-// $Id: read.inc.php,v 1.6 2004/08/04 13:35:40 henoheno Exp $
-//
-// ¥Ú¡¼¥¸¤Îɽ¼¨¤ÈInterWikiName¤Î²ò¼á
+// Read plugin: Show a page and InterWiki
function plugin_read_action()
{
- global $get, $post, $vars;
- global $_title_invalidwn, $_msg_invalidiwn;
+ 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 (is_interwiki($page)) {
- return do_plugin_action('interwiki'); // InterWikiName¤ò½èÍý
+ } else if (! PKWK_SAFE_MODE && is_interwiki($page)) {
+ return do_plugin_action('interwiki'); // Process InterWikiName
} else if (is_pagename($page)) {
- $get['cmd'] = $post['cmd'] = $vars['cmd'] = 'edit';
- return do_plugin_action('edit'); // ¸ºß¤·¤Ê¤¤¤Î¤Ç¡¢ÊÔ½¸¥Õ¥©¡¼¥à¤òɽ¼¨
+ $vars['cmd'] = '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', htmlspecialchars($page),
+ 'body'=>str_replace('$1', htmlsc($page),
str_replace('$2', 'WikiName', $_msg_invalidiwn))
);
}
}
-?>