v13 fixes and config updates
This commit is contained in:
24
patches/fix_fs_media_gallery_album_assign.php
Normal file
24
patches/fix_fs_media_gallery_album_assign.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
$file = dirname(__DIR__) . '/vendor/minifranske/fs-media-gallery/Classes/Controller/MediaAlbumController.php';
|
||||
|
||||
echo "Fix sending incorrect variable to Fluid template - 20260714\n\n";
|
||||
|
||||
if (file_exists($file)) {
|
||||
$content = file_get_contents($file);
|
||||
|
||||
$oldLine = '\'mediaAlbum\' => $mediaAlbum,';
|
||||
$newLine = '\'mediaAlbum\' => $mediaAlbumObject,';
|
||||
|
||||
if (strpos($content, $oldLine) !== false) {
|
||||
$content = str_replace($oldLine, $newLine, $content);
|
||||
file_put_contents($file, $content);
|
||||
echo "\n-> [SUCCESS] Patch fs_media_gallery applied!\n\n";
|
||||
} else {
|
||||
echo "\n-> [INFO] Patch fs_media_gallery not applied or row not found.\n\n";
|
||||
}
|
||||
} else {
|
||||
echo "\n-> [ERROR] Unable to find fs-media-gallery file.\n\n";
|
||||
}
|
||||
Reference in New Issue
Block a user