Introduce the mediapicker field (#1125)

Added a new `mediapicker` form field which allows to select a media from any page
+ 
Provided an option to control how parent select field displays
This commit is contained in:
Flavio Copes
2017-06-02 16:28:52 +02:00
committed by GitHub
parent e6fa905824
commit f700837e92
38 changed files with 1432 additions and 63 deletions

View File

@@ -924,7 +924,7 @@ class AdminBaseController
$fileParts = pathinfo($filename);
foreach (scandir($fileParts['dirname']) as $file) {
$regex_pattern = "/" . preg_quote($fileParts['filename']) . "@\d+x\." . $fileParts['extension'] . "$|" . preg_quote($fileParts['basename']) . ".meta.yaml$/";
$regex_pattern = "/" . preg_quote($fileParts['filename']) . "@\d+x\." . $fileParts['extension'] . "(?:\.meta\.yaml)?$|" . preg_quote($fileParts['basename']) . "\.meta\.yaml$/";
if (preg_match($regex_pattern, $file)) {
$path = $fileParts['dirname'] . '/' . $file;
@unlink($path);