@@ -1862,13 +1862,6 @@ protected function getParameters($settings) {
1862
1862
$ page = $ this ->processPageParameter ($ page );
1863
1863
$ orderings = $ this ->processOrderingsParameter ($ orderings );
1864
1864
1865
- // input
1866
- $ multi = (strpos ($ key [0 ],', ' )!==false ) || (strlen ($ post )?($ post [0 ]=='[ ' ):false );
1867
- $ inputs = $ this ->retrieveInputs ($ post );
1868
- if ($ before ) {
1869
- $ this ->applyBeforeHandler ($ action ,$ database ,$ tables [0 ],$ key [0 ],$ before ,$ inputs );
1870
- }
1871
-
1872
1865
// reflection
1873
1866
list ($ tables ,$ collect ,$ select ) = $ this ->findRelations ($ tables ,$ database ,$ auto_include );
1874
1867
$ fields = $ this ->findFields ($ tables ,$ columns ,$ exclude ,$ select ,$ database );
@@ -1880,6 +1873,13 @@ protected function getParameters($settings) {
1880
1873
if ($ tenancy_function ) $ this ->applyTenancyFunction ($ tenancy_function ,$ action ,$ database ,$ fields ,$ filters );
1881
1874
if ($ column_authorizer ) $ this ->applyColumnAuthorizer ($ column_authorizer ,$ action ,$ database ,$ fields );
1882
1875
1876
+ // input
1877
+ $ multi = (strpos ($ key [0 ],', ' )!==false ) || (strlen ($ post )?($ post [0 ]=='[ ' ):false );
1878
+ $ inputs = $ this ->retrieveInputs ($ post );
1879
+ if ($ before ) {
1880
+ $ this ->applyBeforeHandler ($ action ,$ database ,$ tables [0 ],$ key [0 ],$ before ,$ inputs );
1881
+ }
1882
+
1883
1883
foreach ($ inputs as $ k =>$ context ) {
1884
1884
$ input = $ this ->filterInputByFields ($ context ,$ fields [$ tables [0 ]]);
1885
1885
0 commit comments