mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-05-19 09:18:18 +03:00
fix Ticket #231
This commit is contained in:
parent
d027889c9a
commit
85fec5588c
|
@ -301,7 +301,7 @@ class ModuleImage extends Module {
|
|||
* @param string $sPath
|
||||
* @return string
|
||||
*/
|
||||
public function GetServerPath($sPath) {
|
||||
public function GetServerPath($sPath) {
|
||||
/**
|
||||
* Определяем, принадлежит ли этот адрес основному домену
|
||||
*/
|
||||
|
@ -311,8 +311,11 @@ class ModuleImage extends Module {
|
|||
/**
|
||||
* Выделяем адрес пути
|
||||
*/
|
||||
$sPath = parse_url($sPath,PHP_URL_PATH);
|
||||
return rtrim(Config::Get('path.root.server'),'/').'/'.ltrim($sPath,'/');
|
||||
$sPath = ltrim(parse_url($sPath,PHP_URL_PATH),'/');
|
||||
if($iOffset = Config::Get('path.offset_request_url')){
|
||||
$sPath = preg_replace('#^([^/]+/*){'.$iOffset.'}#msi', '', $sPath);
|
||||
}
|
||||
return rtrim(Config::Get('path.root.server'),'/').'/'.$sPath;
|
||||
}
|
||||
/**
|
||||
* Возвращает серверный адрес по переданному web-адресу
|
||||
|
|
Loading…
Reference in a new issue