OSDN Git Service

Cleankup. Remove redundant tabs and spaces with sed 's/[ ][ ]*$//'
[pukiwiki/pukiwiki.git] / plugin / source.inc.php
1 <?php
2 /////////////////////////////////////////////////
3 // PukiWiki - Yet another WikiWikiWeb clone.
4 //
5 // $Id: source.inc.php,v 1.12 2004/07/31 03:09:20 henoheno Exp $
6 //
7 // ¥Ú¡¼¥¸¥½¡¼¥¹¤òɽ¼¨
8
9 function plugin_source_action()
10 {
11         global $vars;
12         global $_source_messages;
13
14         $vars['refer'] = $vars['page'];
15
16         if (!is_page($vars['page']) || !check_readable($vars['page'],false,false))
17         {
18                 return array(
19                         'msg'=>$_source_messages['msg_notfound'],
20                         'body'=>$_source_messages['err_notfound']
21                 );
22         }
23         return array(
24                 'msg'=>$_source_messages['msg_title'],
25                 'body' =>
26                         '<pre id="source">'.
27                         htmlspecialchars(join('',get_source($vars['page']))).
28                         '</pre>'
29         );
30 }
31 ?>