Fix merge regressions from 3.2 -> 3

This commit is contained in:
Damian Mooyman 2015-12-22 14:29:29 +13:00
parent 48a30909f3
commit 4e3d6f9118
2 changed files with 5 additions and 1 deletions

View File

@ -181,7 +181,7 @@
}
// If no action is selected, enable all nodes
if(!actionURL || actionURL == -1 || !viewMode.hasClass('active')) {
if(!actionUrl || actionUrl == -1 || !viewMode.hasClass('active')) {
$(rootNode).find('li').each(function() {
$(this).setEnabled(true);
});

View File

@ -470,7 +470,10 @@ class HtmlEditorField_Toolbar extends RequestHandler {
protected function viewfile_getLocalFileByURL($fileUrl) {
$filteredUrl = Director::makeRelative($fileUrl);
// Remove prefix and querystring
$filteredUrl = Image::strip_resampled_prefix($filteredUrl);
list($filteredUrl) = explode('?', $filteredUrl);
$file = File::get()->filter('Filename', $filteredUrl)->first();
@ -513,6 +516,7 @@ class HtmlEditorField_Toolbar extends RequestHandler {
$file = null;
$url = null;
// TODO Would be cleaner to consistently pass URL for both local and remote files,
// but GridField doesn't allow for this kind of metadata customization at the moment.
if($fileUrl = $request->getVar('FileURL')) {