Skip to content

Commit b91bd31

Browse files
committed
cleanup construct
1 parent 444b530 commit b91bd31

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

api.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1874,16 +1874,12 @@ protected function getParameters($settings) {
18741874
if ($column_authorizer) $this->applyColumnAuthorizer($column_authorizer,$action,$database,$fields);
18751875

18761876
// input
1877-
$multi = strpos($key[0],',')!==false;
1878-
$inputs = array();
1879-
$contexts = array();
1880-
if (strlen($post)) {
1881-
$multi = $post[0]=='[';
1882-
$contexts = $this->retrieveInputs($post);
1883-
}
1877+
$multi = (strpos($key[0],',')!==false) || (strlen($post)?($post[0]=='['):false);
1878+
$contexts = $this->retrieveInputs($post);
18841879
if ($before) {
18851880
$this->applyBeforeHandler($action,$database,$tables[0],$key[0],$before,$contexts);
18861881
}
1882+
$inputs = array();
18871883
foreach ($contexts as $context) {
18881884
$input = $this->filterInputByFields($context,$fields[$tables[0]]);
18891885

0 commit comments

Comments
 (0)