Skip to content

Commit

Permalink
Fix an issue when process/action values are CamelCased (#14676)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLuckers authored and opengeek committed Aug 21, 2019
1 parent 5643cf7 commit ea9b0e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manager/assets/modext/core/modx.component.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ Ext.extend(MODx.toolbar.ActionButtons,Ext.Toolbar,{
Ext.applyIf(itm.params,o.baseParams); Ext.applyIf(itm.params,o.baseParams);
var url; var url;


var process = itm.process.substr(itm.process.lastIndexOf('/') + 1); var process = itm.process.substr(itm.process.lastIndexOf('/') + 1).toLowerCase();
if ((process === 'create' || process === 'duplicate' || itm.reload) && res.object.id) { if ((process === 'create' || process === 'duplicate' || itm.reload) && res.object.id) {
itm.params.id = res.object.id; itm.params.id = res.object.id;
if (MODx.request.parent) { itm.params.parent = MODx.request.parent; } if (MODx.request.parent) { itm.params.parent = MODx.request.parent; }
Expand All @@ -333,7 +333,7 @@ Ext.extend(MODx.toolbar.ActionButtons,Ext.Toolbar,{
action = o.actions.edit; action = o.actions.edit;
} else { } else {
// Else assume we want the 'update' controller // Else assume we want the 'update' controller
action = itm.process.replace('create', 'update'); action = itm.process.replace('create', 'update').replace('Create', 'Update');
} }
MODx.loadPage(action, url); MODx.loadPage(action, url);


Expand Down

0 comments on commit ea9b0e8

Please sign in to comment.