#3807: Wrong js/css path composition at AssetController::buildTarget() fixed

This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
Klimov Paul
2014-06-13 12:40:40 +03:00
gitea-unlock(16/)
parent 88c25245a2
commit 49f5d364a5

5
framework/console/controllers/AssetController.php
View File

@@ -302,9 +302,10 @@ class AssetController extends Controller
$this->compressCssFiles($inputFiles, $tempFile);
}
$outputFile = $target->basePath . '/' . strtr($target->$type, ['{hash}' => md5_file($tempFile)]);
$targetFile = strtr($target->$type, ['{hash}' => md5_file($tempFile)]);
$outputFile = $target->basePath . '/' . $targetFile;
rename($tempFile, $outputFile);
$target->$type = [$outputFile];
$target->$type = [$targetFile];
}
/**