From 4d199180b31d37afaaf6eb609e83d8e69be6be70 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 17 Jul 2014 09:26:15 +0200 Subject: [PATCH] We do not want to access $_POST directly if it is possible to avoid it --- application/forms/Authentication/LoginForm.php | 2 +- modules/monitoring/application/controllers/ListController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/forms/Authentication/LoginForm.php b/application/forms/Authentication/LoginForm.php index 9955c92d1..cbe25b623 100644 --- a/application/forms/Authentication/LoginForm.php +++ b/application/forms/Authentication/LoginForm.php @@ -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'); diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index 23fe815a3..f0cdb2767 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -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(