mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-07-16 17:21:46 +02:00
Merge branch 'release/1.8.7'
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
# v1.8.7
|
||||
## 07/31/2018
|
||||
|
||||
1. [](#bugfix)
|
||||
* Fix for deleting 'extra' media files [grav#2100](https://githubcom/getgrav/grav/issues/2100)
|
||||
|
||||
# v1.8.6
|
||||
## 07/13/2018
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: Admin Panel
|
||||
version: 1.8.6
|
||||
version: 1.8.7
|
||||
description: Adds an advanced administration panel to manage your site
|
||||
icon: empire
|
||||
author:
|
||||
|
||||
@@ -1826,7 +1826,13 @@ class AdminController extends AdminBaseController
|
||||
// Remove Extra Files
|
||||
foreach (scandir($media->path(), SCANDIR_SORT_NONE) as $file) {
|
||||
if (preg_match("/{$fileParts['filename']}@\d+x\.{$fileParts['extension']}(?:\.meta\.yaml)?$|{$filename}\.meta\.yaml$/", $file)) {
|
||||
$result = unlink($media->path() . '/' . $file);
|
||||
|
||||
$targetPath = $media->path() . '/' . $file;
|
||||
if ($locator->isStream($targetPath)) {
|
||||
$targetPath = $locator->findResource($targetPath, true, true);
|
||||
}
|
||||
|
||||
$result = unlink($targetPath);
|
||||
|
||||
if (!$result) {
|
||||
$this->admin->json_response = [
|
||||
|
||||
Reference in New Issue
Block a user