parent
15209a9575
commit
8b71385481
|
|
@ -242,22 +242,12 @@ class MediaManager extends WidgetBase
|
|||
}
|
||||
|
||||
if ($type === MediaLibraryItem::TYPE_FILE) {
|
||||
/*
|
||||
* Extensibility
|
||||
*/
|
||||
$this->fireSystemEvent('media.file.beforeDelete', [$path]);
|
||||
|
||||
/*
|
||||
* Add to bulk collection
|
||||
*/
|
||||
$filesToDelete[] = $path;
|
||||
}
|
||||
else if ($type === MediaLibraryItem::TYPE_FOLDER) {
|
||||
/*
|
||||
* Extensibility
|
||||
*/
|
||||
$this->fireSystemEvent('media.folder.beforeDelete', [$path]);
|
||||
|
||||
/*
|
||||
* Delete single folder
|
||||
*/
|
||||
|
|
@ -326,11 +316,6 @@ class MediaManager extends WidgetBase
|
|||
$type = Input::get('type');
|
||||
|
||||
if ($type == MediaLibraryItem::TYPE_FILE) {
|
||||
/*
|
||||
* Extensibility
|
||||
*/
|
||||
$this->fireSystemEvent('media.file.beforeRename', [$originalPath, $newPath]);
|
||||
|
||||
/*
|
||||
* Move single file
|
||||
*/
|
||||
|
|
@ -342,11 +327,6 @@ class MediaManager extends WidgetBase
|
|||
$this->fireSystemEvent('media.file.rename', [$originalPath, $newPath]);
|
||||
}
|
||||
else {
|
||||
/*
|
||||
* Extensibility
|
||||
*/
|
||||
$this->fireSystemEvent('media.folder.beforeRename', [$originalPath, $newPath]);
|
||||
|
||||
/*
|
||||
* Move single folder
|
||||
*/
|
||||
|
|
@ -387,11 +367,6 @@ class MediaManager extends WidgetBase
|
|||
throw new ApplicationException(Lang::get('cms::lang.media.folder_or_file_exist'));
|
||||
}
|
||||
|
||||
/*
|
||||
* Extensibility
|
||||
*/
|
||||
$this->fireSystemEvent('media.folder.beforeCreate', [$newFolderPath]);
|
||||
|
||||
/*
|
||||
* Create the new folder
|
||||
*/
|
||||
|
|
@ -468,11 +443,6 @@ class MediaManager extends WidgetBase
|
|||
$library = MediaLibrary::instance();
|
||||
|
||||
foreach ($files as $path) {
|
||||
/*
|
||||
* Extensibility
|
||||
*/
|
||||
$this->fireSystemEvent('media.file.beforeMove', [$path, $dest]);
|
||||
|
||||
/*
|
||||
* Move a single file
|
||||
*/
|
||||
|
|
@ -485,11 +455,6 @@ class MediaManager extends WidgetBase
|
|||
}
|
||||
|
||||
foreach ($folders as $path) {
|
||||
/*
|
||||
* Extensibility
|
||||
*/
|
||||
$this->fireSystemEvent('media.folder.beforeMove', [$path, $dest]);
|
||||
|
||||
/*
|
||||
* Move a single folder
|
||||
*/
|
||||
|
|
@ -1134,11 +1099,6 @@ class MediaManager extends WidgetBase
|
|||
$path = MediaLibrary::validatePath($path);
|
||||
$filePath = $path.'/'.$fileName;
|
||||
|
||||
/*
|
||||
* Extensibility
|
||||
*/
|
||||
$this->fireSystemEvent('media.file.beforeUpload', [$filePath, $uploadedFile]);
|
||||
|
||||
MediaLibrary::instance()->put(
|
||||
$filePath,
|
||||
File::get($uploadedFile->getRealPath())
|
||||
|
|
|
|||
Loading…
Reference in New Issue