<?php
// PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: init.php,v 1.44 2006/05/15 14:47:42 henoheno Exp $
+// $Id: init.php,v 1.57 2011/01/25 15:01:01 henoheno Exp $
// Copyright (C)
// 2002-2006 PukiWiki Developers Team
// 2001-2002 Originally written by yu-ji
// PukiWiki version / Copyright / Licence
-define('S_VERSION', '1.4.7_rc1');
+define('S_VERSION', '1.5.0');
define('S_COPYRIGHT',
'<strong>PukiWiki ' . S_VERSION . '</strong>' .
' Copyright © 2001-2006' .
/////////////////////////////////////////////////
// Init server variables
+// Comapat and suppress notices
+if (!isset($HTTP_SERVER_VARS)) $HTTP_SERVER_VARS = array();
+
foreach (array('SCRIPT_NAME', 'SERVER_ADMIN', 'SERVER_NAME',
'SERVER_PORT', 'SERVER_SOFTWARE') as $key) {
define($key, isset($_SERVER[$key]) ? $_SERVER[$key] : '');
/////////////////////////////////////////////////
// INI_FILE: LANG ¤Ë´ð¤Å¤¯¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°ÀßÄê
-// CONTENT_CHARSET: Internal content encoding = Output content charset (for skin)
-// 'UTF-8', 'iso-8859-1', 'EUC-JP' or ...
-
// MB_LANGUAGE: mb_language (for mbstring extension)
// 'uni'(means UTF-8), 'English', or 'Japanese'
-
// SOURCE_ENCODING: Internal content encoding (for mbstring extension)
// 'UTF-8', 'ASCII', or 'EUC-JP'
+// CONTENT_CHARSET: Internal content encoding = Output content charset
+// (for DTD, htmlsc())
+// 'UTF-8', 'iso-8859-1', 'EUC-JP' or ...
switch (LANG){
-case 'en':
- // ASCII
- define('CONTENT_CHARSET', 'iso-8859-1');
- define('MB_LANGUAGE', 'English');
- define('SOURCE_ENCODING', 'ASCII');
-
- // UTF-8
- //define('CONTENT_CHARSET', 'UTF-8');
- //define('MB_LANGUAGE', 'English');
- //define('SOURCE_ENCODING', 'UTF-8');
-
- break;
-
-case 'ja':
- // EUC-JP
- define('CONTENT_CHARSET', 'EUC-JP');
- define('MB_LANGUAGE', 'Japanese');
- define('SOURCE_ENCODING', 'EUC-JP');
- break;
-
-case 'ko':
- // UTF-8 (See BugTrack2/13 for all hack about Korean support, and give us your report!)
- define('CONTENT_CHARSET', 'UTF-8');
- define('MB_LANGUAGE', 'Korean');
- define('SOURCE_ENCODING', 'UTF-8');
- break;
+case 'en': define('MB_LANGUAGE', 'English' ); break;
+case 'ja': define('MB_LANGUAGE', 'Japanese'); break;
+//UTF-8:case 'ko': define('MB_LANGUAGE', 'Korean' ); break;
+//UTF-8: // See BugTrack2/13 for all hack about Korean support,
+//UTF-8: // and give us your report!
+default: die_message('No such language "' . LANG . '"'); break;
+}
-default:
- die_message('No such language "' . LANG . '"');
+//UTF-8:define('PKWK_UTF8_ENABLE', 1);
+if (defined('PKWK_UTF8_ENABLE')) {
+ define('SOURCE_ENCODING', 'UTF-8');
+ define('CONTENT_CHARSET', 'UTF-8');
+} else {
+ switch (LANG){
+ case 'en':
+ define('SOURCE_ENCODING', 'ASCII');
+ define('CONTENT_CHARSET', 'iso-8859-1');
+ break;
+ case 'ja':
+ define('SOURCE_ENCODING', 'EUC-JP');
+ define('CONTENT_CHARSET', 'EUC-JP');
+ break;
+ }
}
mb_language(MB_LANGUAGE);
$get['cmd'] = $post['cmd'] = $vars['cmd'] = 'md5';
}
-// TrackBack Ping
-if (isset($vars['tb_id']) && $vars['tb_id'] != '') {
- $get['cmd'] = $post['cmd'] = $vars['cmd'] = 'tb';
-}
-
// cmd¤âplugin¤â»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¢QUERY_STRING¤ò¥Ú¡¼¥¸Ì¾¤«InterWikiName¤Ç¤¢¤ë¤È¤ß¤Ê¤¹
if (! isset($vars['cmd']) && ! isset($vars['plugin'])) {