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

This commit is contained in:
Johannes Meyer 2014-07-17 09:26:15 +02:00
parent b7f5c8a84d
commit 4d199180b3
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ class LoginForm extends Form
'required' => true
));
// TODO: We need a place to intercept filled forms before rendering
if (isset($_POST['username'])) {
if ($this->getRequest()->getPost('username') !== null) {
$this->getElement('password')->setAttrib('class', 'autofocus');
} else {
$this->getElement('username')->setAttrib('class', 'autofocus');

View File

@ -518,7 +518,7 @@ class Monitoring_ListController extends Controller
if ($modifyFilter) {
if ($this->_request->isPost()) {
$filter = $filter->applyChanges($_POST);
$filter = $filter->applyChanges($this->_request->getPost());
$this->redirectNow($this->url->without('page')->setQueryString($filter->toQueryString()));
}
$this->view->filterEditor = Widget::create('filterEditor', array(