mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-01 05:55:02 +03:00
fix router
This commit is contained in:
parent
1aa8bc686a
commit
dc06c05409
|
@ -98,7 +98,7 @@ class Router extends Object {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function GetRequestUri() {
|
protected function GetRequestUri() {
|
||||||
$sReq=preg_replace("/\/+/",'/',str_replace(preg_replace("@/*index\.php@U",'',$_SERVER['PHP_SELF']),'',$_SERVER['REQUEST_URI']));
|
$sReq=preg_replace("/\/+/",'/',$_SERVER['REQUEST_URI']);
|
||||||
$sReq=preg_replace("/^\/(.*)\/?$/U",'\\1',$sReq);
|
$sReq=preg_replace("/^\/(.*)\/?$/U",'\\1',$sReq);
|
||||||
$sReq=preg_replace("/^(.*)\/\?.*$/U",'\\1',$sReq);
|
$sReq=preg_replace("/^(.*)\/\?.*$/U",'\\1',$sReq);
|
||||||
|
|
||||||
|
|
|
@ -1525,6 +1525,13 @@ class Install {
|
||||||
$sLocalConfigFile = $this->sConfigDir.'/'.self::LOCAL_CONFIG_FILE_NAME;
|
$sLocalConfigFile = $this->sConfigDir.'/'.self::LOCAL_CONFIG_FILE_NAME;
|
||||||
$this->SaveConfig('path.root.web',$this->GetPathRootWeb(), $sLocalConfigFile);
|
$this->SaveConfig('path.root.web',$this->GetPathRootWeb(), $sLocalConfigFile);
|
||||||
$this->SaveConfig('path.root.server', $this->GetPathRootServer(), $sLocalConfigFile);
|
$this->SaveConfig('path.root.server', $this->GetPathRootServer(), $sLocalConfigFile);
|
||||||
|
|
||||||
|
$aDirs=array();
|
||||||
|
$sDirs=trim(str_replace('http://'.$_SERVER['HTTP_HOST'],'',$this->GetPathRootWeb()),'/');
|
||||||
|
if ($sDirs!='') {
|
||||||
|
$aDirs=explode('/',$sDirs);
|
||||||
|
}
|
||||||
|
$this->SaveConfig('path.offset_request_url', count($aDirs), $sLocalConfigFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
function GetPathRootWeb() {
|
function GetPathRootWeb() {
|
||||||
|
|
Loading…
Reference in a new issue