2 // PukiWiki - Yet another WikiWikiWeb clone.
4 // Copyright 2003-2017 PukiWiki Development Team
5 // License: GPL v2 or (at your option) any later version
7 // Read plugin: Show a page and InterWiki
9 function plugin_read_action()
11 global $vars, $_title_invalidwn, $_msg_invalidiwn;
13 $page = isset($vars['page']) ? $vars['page'] : '';
16 check_readable($page, true, true);
17 header_lastmod($page);
18 is_pagelist_cache_enabled(true); // Enable get_existpage() cache
19 return array('msg'=>'', 'body'=>'');
21 } else if (! PKWK_SAFE_MODE && is_interwiki($page)) {
22 return do_plugin_action('interwiki'); // Process InterWikiName
24 } else if (is_pagename($page)) {
25 $vars['cmd'] = 'edit';
26 return do_plugin_action('edit'); // Page not found, then show edit form
31 'msg'=>$_title_invalidwn,
32 'body'=>str_replace('$1', htmlsc($page),
33 str_replace('$2', 'WikiName', $_msg_invalidiwn))