[php-blog-cvs] r2691 - in branches/2.0: . include
A reliable, secure & extensible PHP blog | Not mainstream since 2002
Brought to you by:
garvinhicking,
jhermanns
From: <mi...@ma...> - 2010-08-26 22:01:42
|
Author: milky Date: 2010-08-27 00:01:35 +0200 (Fri, 27 Aug 2010) New Revision: 2691 Modified: branches/2.0/include/compat.inc.php branches/2.0/serendipity_config.inc.php Log: [two] removed PHP<4.0.6 workarounds, remaining users can deploy PHP_Compat Modified: branches/2.0/include/compat.inc.php =================================================================== --- branches/2.0/include/compat.inc.php 2010-08-26 21:48:38 UTC (rev 2690) +++ branches/2.0/include/compat.inc.php 2010-08-26 22:01:35 UTC (rev 2691) @@ -2,28 +2,19 @@ # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details -if (IN_serendipity !== true) { - die ("Don't hack!"); -} +@in_serendipity(); $serendipity = array(); @ini_set('magic_quotes_runtime', 'off'); if (!defined('PATH_SEPARATOR')) { - if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + if (DIRECTORY_SEPARATOR == "\\") { define('PATH_SEPARATOR', ';'); } else { define('PATH_SEPARATOR', ':'); } } -if (!defined('DIRECTORY_SEPARATOR')) { - if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { - define('DIRECTORY_SEPARATOR', '\\'); - } else { - define('DIRECTORY_SEPARATOR', '/'); - } -} /** * Create a snapshot of the current memory usage @@ -77,29 +68,6 @@ } } -if (!isset($_REQUEST)) { - $_REQUEST = &$HTTP_REQUEST_VARS; -} -if (!isset($_POST)) { - $_POST = &$HTTP_POST_VARS; -} - -if (!isset($_GET)) { - $_GET = &$HTTP_GET_VARS; -} - -if (!isset($_SESSION)) { - $_SESSION = &$HTTP_SESSION_VARS; -} - -if (!isset($_COOKIE)) { - $_COOKIE = &$HTTP_COOKIE_VARS; -} - -if (!isset($_SERVER)) { - $_SERVER = &$HTTP_SERVER_VARS; -} - if (extension_loaded('filter') && function_exists('input_name_to_filter') && input_name_to_filter(ini_get('filter.default')) !== FILTER_UNSAFE_RAW) { foreach ($_POST as $key => $value) { $_POST[$key] = input_get(INPUT_POST, $key, FILTER_UNSAFE_RAW); Modified: branches/2.0/serendipity_config.inc.php =================================================================== --- branches/2.0/serendipity_config.inc.php 2010-08-26 21:48:38 UTC (rev 2690) +++ branches/2.0/serendipity_config.inc.php 2010-08-26 22:01:35 UTC (rev 2691) @@ -33,6 +33,7 @@ if (!defined('IN_serendipity')) { define('IN_serendipity', true); + function in_serendipity() {} } include_once(S9Y_INCLUDE_PATH . 'include/compat.inc.php'); |