@@ -1873,25 +1873,26 @@ protected function getParameters($settings) {
1873
1873
if ($ tenancy_function ) $ this ->applyTenancyFunction ($ tenancy_function ,$ action ,$ database ,$ fields ,$ filters );
1874
1874
if ($ column_authorizer ) $ this ->applyColumnAuthorizer ($ column_authorizer ,$ action ,$ database ,$ fields );
1875
1875
1876
+ // input
1876
1877
$ multi = strpos ($ key [0 ],', ' )!==false ;
1877
1878
$ inputs = array ();
1879
+ $ contexts = array ();
1878
1880
if (strlen ($ post )) {
1879
- // input
1880
1881
$ multi = $ post [0 ]=='[ ' ;
1881
1882
$ contexts = $ this ->retrieveInputs ($ post );
1882
- if ($ before ) {
1883
- $ this ->applyBeforeHandler ($ action ,$ database ,$ tables [0 ],$ key [0 ],$ before ,$ contexts );
1884
- }
1885
- foreach ($ contexts as $ context ) {
1886
- $ input = $ this ->filterInputByFields ($ context ,$ fields [$ tables [0 ]]);
1883
+ }
1884
+ if ($ before ) {
1885
+ $ this ->applyBeforeHandler ($ action ,$ database ,$ tables [0 ],$ key [0 ],$ before ,$ contexts );
1886
+ }
1887
+ foreach ($ contexts as $ context ) {
1888
+ $ input = $ this ->filterInputByFields ($ context ,$ fields [$ tables [0 ]]);
1887
1889
1888
- if ($ tenancy_function ) $ this ->applyInputTenancy ($ tenancy_function ,$ action ,$ database ,$ tables [0 ],$ input ,$ fields [$ tables [0 ]]);
1889
- if ($ input_sanitizer ) $ this ->applyInputSanitizer ($ input_sanitizer ,$ action ,$ database ,$ tables [0 ],$ input ,$ fields [$ tables [0 ]]);
1890
- if ($ input_validator ) $ this ->applyInputValidator ($ input_validator ,$ action ,$ database ,$ tables [0 ],$ input ,$ fields [$ tables [0 ]],$ context );
1890
+ if ($ tenancy_function ) $ this ->applyInputTenancy ($ tenancy_function ,$ action ,$ database ,$ tables [0 ],$ input ,$ fields [$ tables [0 ]]);
1891
+ if ($ input_sanitizer ) $ this ->applyInputSanitizer ($ input_sanitizer ,$ action ,$ database ,$ tables [0 ],$ input ,$ fields [$ tables [0 ]]);
1892
+ if ($ input_validator ) $ this ->applyInputValidator ($ input_validator ,$ action ,$ database ,$ tables [0 ],$ input ,$ fields [$ tables [0 ]],$ context );
1891
1893
1892
- $ this ->convertInputs ($ input ,$ fields [$ tables [0 ]]);
1893
- $ inputs [] = $ input ;
1894
- }
1894
+ $ this ->convertInputs ($ input ,$ fields [$ tables [0 ]]);
1895
+ $ inputs [] = $ input ;
1895
1896
}
1896
1897
1897
1898
return compact ('action ' ,'database ' ,'tables ' ,'key ' ,'page ' ,'filters ' ,'fields ' ,'orderings ' ,'transform ' ,'multi ' ,'inputs ' ,'collect ' ,'select ' ,'before ' ,'after ' );
0 commit comments