Skip to content

Commit

Permalink
Get Value on PRESAVE Action
Browse files Browse the repository at this point in the history
  • Loading branch information
skerbis committed Aug 1, 2022
1 parent 5253ebd commit f409ce6
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/MBlock/Handler/MBlockValueHandler.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @author mail[at]joachim-doerr[dot]com Joachim Doerr
* @package redaxo5
Expand All @@ -20,6 +21,16 @@ public static function loadRexVars()
if (rex_get('function') == 'add') {
return $result;
}
if (rex_request('save', 'int') == 1) {
$result = [];

if (rex_request('REX_INPUT_VALUE', 'array')) {
foreach (rex_request('REX_INPUT_VALUE') as $key => $value) {
$result['value'][$key] = $value;
}
return $result;
}
}

if ($sliceId != false) {
$table = rex::getTablePrefix() . 'article_slice';
Expand Down Expand Up @@ -99,4 +110,4 @@ public static function loadFromTable($table, $id = 0)

return $result;
}
}
}

0 comments on commit f409ce6

Please sign in to comment.