diff --git a/code/controller/model.php b/code/controller/model.php index b5bce12d2..98b488609 100644 --- a/code/controller/model.php +++ b/code/controller/model.php @@ -124,8 +124,16 @@ public function getModel() ); } - //Inject the request into the model state - $this->_model->setState($this->getRequest()->query->toArray()); + if ($query = $this->getRequest()->getQuery()->toArray()) + { + // Filter the current query against internal states + foreach ($this->_model->getState() as $state) { + if ($state->internal && isset($query[$state->name])) unset($query[$state->name]); + } + + //Inject the request into the model state + $this->_model->setState($query); + } } return $this->_model;