Skip to content

Commit

Permalink
Fix a bug where renaming an asset file was impossible using the eleme…
Browse files Browse the repository at this point in the history
…nt action. (#3707)
  • Loading branch information
andris-sevcenko committed Jan 25, 2019
1 parent 5b76fca commit 512847a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG-v3.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes for Craft CMS 3.x

## Unreleased

### Fixed
- Fixed a bug where renaming an asset file was impossible using the element action. ([#3707](https://github.com/craftcms/cms/issues/3707))

## 3.1.4 - 2019-01-24

### Added
Expand Down
4 changes: 1 addition & 3 deletions src/elements/actions/RenameFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,9 @@ public function getTriggerHtml()
Craft.elementIndex.setIndexBusy();
var sourcePath = Craft.elementIndex.\$source.data('key').split('/');
var assetSourceKey = sourcePath.pop();
var data = {
assetId: assetId,
folderId: assetSourceKey.split(':')[1],
folderId: Craft.elementIndex.\$source.data('folder-id'),
filename: newName
};
Expand Down

0 comments on commit 512847a

Please sign in to comment.