Skip to content
Permalink
Browse files

Remove more uses of deprecated properties/methods.

I missed these when doing previous rounds of cleanup.
  • Loading branch information...
markstory committed Feb 3, 2017
1 parent dec61b9 commit 65174c1112fc042a9f7c45bf1705a79fc68d50ac
@@ -287,7 +287,7 @@ public function authCheck(Event $event)
/* @var \Cake\Controller\Controller $controller */
$controller = $event->getSubject();
$action = strtolower($controller->request->params['action']);
$action = strtolower($controller->request->getParam('action'));
if (!$controller->isAction($action)) {
return null;
}
@@ -346,7 +346,7 @@ public function implementedEvents()
*/
protected function _isAllowed(Controller $controller)
{
$action = strtolower($controller->request->params['action']);
$action = strtolower($controller->request->getParam('action'));
return in_array($action, array_map('strtolower', $this->allowedActions));
}
@@ -65,7 +65,7 @@ class CsrfComponent extends Component
* Validates the CSRF token for POST data. If
* the request is a GET request, and the cookie value is absent a cookie will be set.
*
* Once a cookie is set it will be copied into request->params['_csrfToken']
* Once a cookie is set it will be copied into request->getParam('_csrfToken')
* so that application and framework code can easily access the csrf token.
*
* RequestAction requests do not get checked, nor will
@@ -524,8 +524,8 @@ public static function reload()
*
* ```
* Router::addUrlFilter(function ($params, $request) {
* if (isset($request->params['lang']) && !isset($params['lang'])) {
* $params['lang'] = $request->params['lang'];
* if ($request->getParam('lang') && !isset($params['lang'])) {
* $params['lang'] = $request->getParam('lang');
* }
* return $params;
* });
@@ -614,7 +614,7 @@ public static function url($url = null, $full = false)
if ($request) {
$params = $request->params;
$here = $request->here;
$base = $request->base;
$base = $request->getAttribute('base');
} else {
$base = Configure::read('App.base');
if (isset(static::$_requestContext['_base'])) {
@@ -814,7 +814,7 @@ public static function normalize($url = '/')
* Instructs the router to parse out file extensions
* from the URL. For example, http://example.com/posts.rss would yield a file
* extension of "rss". The file extension itself is made available in the
* controller as `$this->request->params['_ext']`, and is used by the RequestHandler
* controller as `$this->request->getParam('_ext')`, and is used by the RequestHandler
* component to automatically switch to alternate layouts and templates, and
* load helpers corresponding to the given content, i.e. RssHelper. Switching
* layouts and helpers requires that the chosen extension has a defined mime type
@@ -872,7 +872,7 @@ public static function parseNamedParams(ServerRequest $request, array $options =
return $request;
}
$named = [];
foreach ($request->params['pass'] as $key => $value) {
foreach ($request->getParam('pass') as $key => $value) {
if (strpos($value, $options['separator']) === false) {
continue;
}

0 comments on commit 65174c1

Please sign in to comment.
You can’t perform that action at this time.