Patchwork\FunctionOverride(getcwd, patchwork_getcwd); } function patchwork_getcwd() { /**/ if (function_exists('getcwd') && @getcwd()) { return getcwd(); /**/ } else { if (false === $a) { return realpath('.'); /**/ } else { return $a; /**/ } } } /**/ if (false !== $a) { /**/ boot::$manager->pushFile('bootup.realpath.php'); Patchwork\FunctionOverride(realpath, patchwork_realpath, $path); /**/ } else { function patchwork_realpath($a) { return realpath($a); } /**/ }
<?php /**/ /*<*/ "\$c�=&Patchwork_Superloader::\$locations;\$d�=1;(\$e�=\$b�=\$a�=__FILE__.'*" . mt_rand(1, mt_getrandmax()) . "')&&\$d�&&0;"; Patchwork\FunctionOverride(get_parent_class, Patchwork_Superloader::get_parent_class, $class); // FIXME: collides with Patchwork\PHP\Override\Php530 on PHP<5.3 /**/ @unlink(PATCHWORK_PROJECT_PATH . '.patchwork.autoloader.php'); /**/ copy(boot::$manager->getCurrentDir() . 'class/Patchwork/Autoloader.php', PATCHWORK_PROJECT_PATH . '.patchwork.autoloader.php'); /**/ if (function_exists('class_alias')) { spl_autoload_register(array('Patchwork_Superloader', 'loadAlias'), true, true); } spl_autoload_register(array('Patchwork_Superloader', 'loadAutoloader'));
<?php // vi: set fenc=utf-8 ts=4 sw=4 et: #patchwork __patchwork__/core/http #patchwork __patchwork__/core/superloader #patchwork __patchwork__/core/logger // Default settings $CONFIG += array('umask' => false, 'clientside' => true, 'i18n.lang_list' => '', 'maxage' => 2678400, 'P3P' => 'CUR ADM', 'xsendfile' => false, 'document.domain' => '', 'X-UA-Compatible' => 'IE=edge,chrome=1', 'session.save_path' => PATCHWORK_ZCACHE, 'session.cookie_path' => 'auto', 'session.cookie_domain' => 'auto', 'session.auth_vars' => array(), 'session.group_vars' => array(), 'translator.adapter' => false, 'translator.options' => array()); // Setup patchwork's environment Patchwork\FunctionOverride(header, Patchwork::header, $s, $replace = true, $response_code = null); empty($CONFIG['umask']) || umask($CONFIG['umask']); empty($CONFIG['xsendfile']) && isset($_SERVER['PATCHWORK_XSENDFILE']) && ($CONFIG['xsendfile'] = $_SERVER['PATCHWORK_XSENDFILE']); // Prepare for I18N $a =& $CONFIG['i18n.lang_list']; $a ? is_array($a) || ($a = explode('|', $a)) : ($a = array('' => '__')); define('PATCHWORK_I18N', 2 <= count($a)); $b = array(); foreach ($a as $k => &$v) { if (is_int($k)) { $v = (string) $v; if (!isset($a[$v])) { $a[$v] = $v; $b[] = preg_quote($v, '#'); } unset($a[$k]); } else { $b[] = preg_quote($v, '#'); } } unset($a, $v); usort($b, 'strlencmp');
<?php // vi: set fenc=utf-8 ts=4 sw=4 et: Patchwork_ShutdownHandler::setup(); Patchwork\FunctionOverride(register_shutdown_function, Patchwork_ShutdownHandler::register, $callback);
<?php // vi: set fenc=utf-8 ts=4 sw=4 et: use Patchwork\PHP\Override as o; // Default settings $CONFIG += array('debug.allowed' => true, 'debug.password' => '', 'turbo' => false); defined('DEBUG') || define('DEBUG', $CONFIG['debug.allowed'] && (!$CONFIG['debug.password'] || isset($_COOKIE['debug_password']) && $CONFIG['debug.password'] == $_COOKIE['debug_password']) ? 1 : 0); DEBUG || error_reporting(E_ALL & ~(E_DEPRECATED | E_USER_DEPRECATED | E_STRICT)); if (Patchwork_Superloader::$turbo = !DEBUG && $CONFIG['turbo']) { spl_autoload_register(array('Patchwork_Superloader', 'loadTurbo'), true, true); if (spl_autoload_unregister(array('Patchwork_Superloader', 'loadAlias'))) { spl_autoload_register(array('Patchwork_Superloader', 'loadAlias'), true, true); } } /**/ if ('\\' === DIRECTORY_SEPARATOR && !function_exists('__patchwork_file_exists')) { if (DEBUG) { // Replace file_exists() on Windows to check if character case is strict Patchwork\FunctionOverride(file_exists, o\WinfsCase, $file); Patchwork\FunctionOverride(is_file, o\WinfsCase, $file); Patchwork\FunctionOverride(is_dir, o\WinfsCase, $file); Patchwork\FunctionOverride(is_link, o\WinfsCase, $file); Patchwork\FunctionOverride(is_executable, o\WinfsCase, $file); Patchwork\FunctionOverride(is_readable, o\WinfsCase, $file); Patchwork\FunctionOverride(is_writable, o\WinfsCase, $file); } /**/ } /**/ boot::$manager->pushFile('config.setup.php');