* Adjust filter and framework

This commit is contained in:
pengjiangxiu
2017-06-22 13:35:16 +08:00
parent d71f095975
commit 1920d57d3a
4 changed files with 7 additions and 6 deletions
+3
View File
@@ -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();
+2 -3
View File
@@ -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;
}
/**
+2 -2
View File
@@ -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));
-1
View File
@@ -10,7 +10,6 @@
* @link http://www.zentao.net
*/
error_reporting(0);
session_start();
define('IN_INSTALL', true);
/* Load the framework. */