Simplify path handling

This commit is contained in:
Kijin Sung 2016-05-03 21:57:37 +09:00
parent b62bbef515
commit 5d23ac2f16

View file

@ -395,9 +395,7 @@ class FrontEndFileHandler extends Handler
{
foreach($indexedMap as $file)
{
$noneCache = (is_readable($file->cdnPath . '/' . $file->fileName)) ? '?' . date('YmdHis', filemtime($file->cdnPath . '/' . $file->fileName)) : '';
$fullFilePath = $file->filePath . '/' . $file->fileName . $noneCache;
$fullFilePath = $file->filePath . '/' . $file->fileName . '?' . date('YmdHis', filemtime($file->fileFullPath));
$result[] = array('file' => $fullFilePath, 'media' => $file->media, 'targetie' => $file->targetIe);
}
}
@ -431,9 +429,7 @@ class FrontEndFileHandler extends Handler
{
foreach($indexedMap as $file)
{
$noneCache = (is_readable($file->cdnPath . '/' . $file->fileName)) ? '?' . date('YmdHis', filemtime($file->cdnPath . '/' . $file->fileName)) : '';
$fullFilePath = $file->filePath . '/' . $file->fileName . $noneCache;
$fullFilePath = $file->filePath . '/' . $file->fileName . '?' . date('YmdHis', filemtime($file->fileFullPath));
$result[] = array('file' => $fullFilePath, 'targetie' => $file->targetIe);
}
}