remove serv name filter in addTimestampToFilePath

This commit is contained in:
2019-01-26 15:09:21 +01:00
parent 2b0b5e54ba
commit ddf37dad09

View File

@@ -94,15 +94,13 @@ abstract class Main extends PhpObject
$this->setMasks(); $this->setMasks();
} }
public function addTimestampToFilePath($sFile) public static function addTimestampToFilePath($sFile)
{ {
//Remove timestamp //Remove timestamp
$sFilePath = preg_replace('/(.*)\?[\d]{14}$/', '$1', $sFile); $sFilePath = preg_replace('/(.*)\?[\d]{14}$/', '$1', $sFile);
//Remove base URL //Add timestamp
$sLocalPath = str_replace($this->asContext['serv_name'], '', $sFilePath); return file_exists($sFilePath)?$sFilePath.'?'.date("YmdHis", filemtime($sFilePath)):$sFile;
return file_exists($sLocalPath)?$sFilePath.'?'.date("YmdHis", filemtime($sLocalPath)):$sFile;
} }
public function addUncaughtError($sError) public function addUncaughtError($sError)