* Adjust filter and framework
This commit is contained in:
@@ -22,6 +22,9 @@ $filter->default->paramValue = 'reg::paramValue';
|
||||
$filter->default->get['onlybody'] = 'equal::yes';
|
||||
$filter->default->get['HTTP_X_REQUESTED_WITH'] = 'equal::XMLHttpRequest';
|
||||
|
||||
$filter->default->cookie['lang'] = 'reg::lang';
|
||||
$filter->default->cookie['theme'] = 'reg::word';
|
||||
|
||||
$filter->bug = new stdclass();
|
||||
$filter->doc = new stdclass();
|
||||
$filter->product = new stdclass();
|
||||
|
||||
@@ -713,10 +713,9 @@ function getWebRoot($full = false)
|
||||
return $http . $_SERVER['HTTP_HOST'] . substr($path, 0, (strrpos($path, '/') + 1));
|
||||
}
|
||||
|
||||
$path = dirname(dirname($path));
|
||||
$path = substr($path, 0, (strrpos($path, '/') + 1));
|
||||
$path = str_replace('\\', '/', $path);
|
||||
if($path == '/') return '/';
|
||||
return $path . '/';
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1061,9 +1061,9 @@ class baseRouter
|
||||
{
|
||||
$value = $_SERVER['ORIG_PATH_INFO'];
|
||||
}
|
||||
elseif(isset($_SERVER['REQUEST_URI']))
|
||||
elseif(isset($this->URI))
|
||||
{
|
||||
$value = htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES);
|
||||
$value = $this->URI;
|
||||
$subpath = str_replace($_SERVER['DOCUMENT_ROOT'], '', dirname($_SERVER['SCRIPT_FILENAME']));
|
||||
if($subpath != '/') $subpath = '/' . $subpath;
|
||||
if($subpath != '' and $subpath != '/' and strpos($value, $subpath) === 0) $value = substr($value, strlen($subpath));
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
error_reporting(0);
|
||||
session_start();
|
||||
define('IN_INSTALL', true);
|
||||
|
||||
/* Load the framework. */
|
||||
|
||||
Reference in New Issue
Block a user