Skip to content

Commit

Permalink
Fix: Editor->actionName() wasn't correctly used for general form su…
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanJard committed Jan 21, 2025
1 parent d584d89 commit cea7999
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Editor extends Ext
* `Editor::ACTION_EDIT` or `Editor::ACTION_DELETE` indicating the request
* type.
*/
public static function action($http, $name = 'action')
public static function action($http, $name = null)
{
if (!isset($http[$name])) {
return self::ACTION_READ;
Expand All @@ -112,7 +112,7 @@ public static function action($http, $name = 'action')
case 'upload':
return self::ACTION_UPLOAD;
default:
throw new \Exception('Unknown Editor action: ' . $http['action']);
throw new \Exception('Unknown Editor action: ' . $http[$name]);
}
}

Expand Down Expand Up @@ -144,7 +144,7 @@ public function __construct($db = null, $table = null, $pkey = null)
*/

/** @var string */
public $version = '2.3.2';
public $version = '2.4.0';

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Private properties
Expand Down Expand Up @@ -997,7 +997,7 @@ private function _process($data)
'options' => [],
];

$action = Editor::action($data);
$action = Editor::action($data, $this->_actionName);
$this->_processData = $data;
$this->_formData = isset($data['data']) ? $data['data'] : null;
$validators = $this->_validator;
Expand Down

0 comments on commit cea7999

Please sign in to comment.