OSDN Git Service

PKWK_READONLY prohibits editing
[pukiwiki/pukiwiki.git] / pukiwiki.php
index c6381c4..e29c12e 100644 (file)
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone.
-//
-// PukiWiki 1.4.*
-//  Copyright (C) 2002 by PukiWiki Developers Team
-//  http://pukiwiki.org/
-//
-// PukiWiki 1.3.*
-//  Copyright (C) 2002 by PukiWiki Developers Team
-//  http://pukiwiki.org/
-//
-// PukiWiki 1.3 (Base)
-//  Copyright (C) 2001,2002 by sng.
-//  <sng@factage.com>
-//  http://factage.com/sng/pukiwiki/
-//
-// Special thanks
-//  YukiWiki by Hiroshi Yuki
-//  <hyuki@hyuki.com>
-//  http://www.hyuki.com/yukiwiki/
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// $Id: pukiwiki.php,v 1.35 2004/07/31 03:09:19 henoheno Exp $
-/////////////////////////////////////////////////
-
-/////////////////////////////////////////////////
-// ¥Ç¡¼¥¿¤ò³ÊǼ¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤äÀßÄê¥Õ¥¡¥¤¥ë¤òÃÖ¤¯¥Ç¥£¥ì¥¯¥È¥ê
-
-if (! defined('DATA_HOME')) define('DATA_HOME', '');
+// $Id: pukiwiki.php,v 1.39 2004/09/20 00:48:34 henoheno Exp $
 
 /////////////////////////////////////////////////
-// ¥µ¥Ö¥ë¡¼¥Á¥ó¤Î³ÊǼÀè¥Ç¥£¥ì¥¯¥È¥ê (¾¤Î *.php¥Õ¥¡¥¤¥ë)
+// Error reporting
 
-if (! defined('SUB_DIR')) define('SUB_DIR', '');
+// error_reporting(0): // Nothing
+error_reporting(E_ERROR | E_PARSE); // Avoid E_WARNING, E_NOTICE, etc
+// error_reporting(E_ALL);
 
 /////////////////////////////////////////////////
-// ¥µ¥Ö¥ë¡¼¥Á¥ó¤ÎÆɤ߹þ¤ß
-
-require(SUB_DIR . 'func.php');
-require(SUB_DIR . 'file.php');
-require(SUB_DIR . 'plugin.php');
-require(SUB_DIR . 'html.php');
-require(SUB_DIR . 'backup.php');
-
-require(SUB_DIR . 'convert_html.php');
-require(SUB_DIR . 'make_link.php');
-require(SUB_DIR . 'diff.php');
-require(SUB_DIR . 'config.php');
-require(SUB_DIR . 'link.php');
-require(SUB_DIR . 'trackback.php');
-require(SUB_DIR . 'auth.php');
-require(SUB_DIR . 'proxy.php');
-require(SUB_DIR . 'mail.php');
-if (!extension_loaded('mbstring')) {
-       require(SUB_DIR . 'mbstring.php');
-}
-
-// ½é´ü²½: ÀßÄê¥Õ¥¡¥¤¥ë¤ÎÆɤ߹þ¤ß
-require(SUB_DIR . 'init.php');
+// Directory definition
+// (Ended with a slash like '../path/to/pkwk/', or '')
+define('DATA_HOME',    '');
+define('LIB_DIR',      'lib/');
 
 /////////////////////////////////////////////////
-// ¥á¥¤¥ó½èÍý
-
-$base = $defaultpage;
-$retvars = array();
-
-// Plug-in action
-if (!empty($vars['plugin'])) {
-       if (!exist_plugin_action($vars['plugin'])) {
-               $s_plugin = htmlspecialchars($vars['plugin']);
-               $msg = "plugin=$s_plugin is not implemented.";
-               $retvars = array('msg'=>$msg,'body'=>$msg);
-       }
-       else {
-               $retvars = do_plugin_action($vars['plugin']);
-               if ($retvars !== FALSE) {
-                       $base = array_key_exists('refer',$vars) ? $vars['refer'] : '';
-               }
-       }
-}
-// Command action
-else if (!empty($vars['cmd'])) {
-       if (!exist_plugin_action($vars['cmd'])) {
-               $s_cmd = htmlspecialchars($vars['cmd']);
-               $msg = "cmd=$s_cmd is not implemented.";
-               $retvars = array('msg'=>$msg,'body'=>$msg);
-       }
-       else {
-               $retvars = do_plugin_action($vars['cmd']);
-               $base = $vars['page'];
-       }
-}
-
-if ($retvars !== FALSE) {
-       $title = htmlspecialchars(strip_bracket($base));
-       $page = make_search($base);
-
-       if (array_key_exists('msg',$retvars) and $retvars['msg'] != '') {
-               $title = str_replace('$1',$title,$retvars['msg']);
-               $page = str_replace('$1',$page,$retvars['msg']);
-       }
-
-       if (array_key_exists('body',$retvars) and $retvars['body'] != '') {
-               $body = $retvars['body'];
-       }
-       else {
-               if ($base == '' or !is_page($base)) {
-                       $base = $defaultpage;
-                       $title = htmlspecialchars(strip_bracket($base));
-                       $page = make_search($base);
-               }
-
-               $vars['cmd'] = 'read';
-               $vars['page'] = $base;
-               $body = convert_html(get_source($base));
-               $body .= tb_get_rdf($vars['page']);
-               ref_save($vars['page']);
-       }
-
-       // ** ½ÐÎϽèÍý **
-       catbody($title,$page,$body);
-}
-// ** ½ªÎ» **
+require(LIB_DIR . 'pukiwiki.php');
 ?>