Fix that the default sort order of a view is not being applied

fixes #6644
We do not want to access $_POST directly if it is possible to avoid it