mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
Ensure absolute path for watermark
This commit is contained in:
parent
f932f5e110
commit
c455fa08c2
@ -346,6 +346,7 @@ class FTFileMakerTask extends BuildTask
|
|||||||
$watermarkPath = ModuleResourceLoader::singleton()->resolvePath(
|
$watermarkPath = ModuleResourceLoader::singleton()->resolvePath(
|
||||||
'silverstripe/frameworktest: images/silverstripe.png'
|
'silverstripe/frameworktest: images/silverstripe.png'
|
||||||
);
|
);
|
||||||
|
$absWatermarkPath = Path::join(BASE_PATH, $watermarkPath);
|
||||||
|
|
||||||
for ($i = 1; $i <= $folderCount; $i++) {
|
for ($i = 1; $i <= $folderCount; $i++) {
|
||||||
$folder = new Folder([
|
$folder = new Folder([
|
||||||
@ -386,7 +387,7 @@ class FTFileMakerTask extends BuildTask
|
|||||||
if ($class === Image::class && $uniqueImages) {
|
if ($class === Image::class && $uniqueImages) {
|
||||||
$copyPath = Path::join(dirname($randomFilePath), $fileName);
|
$copyPath = Path::join(dirname($randomFilePath), $fileName);
|
||||||
copy($randomFilePath, $copyPath);
|
copy($randomFilePath, $copyPath);
|
||||||
$newPath = $this->watermarkImage($watermarkPath, $copyPath);
|
$newPath = $this->watermarkImage($absWatermarkPath, $copyPath);
|
||||||
if ($newPath) {
|
if ($newPath) {
|
||||||
$randomFilePath = $newPath;
|
$randomFilePath = $newPath;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user