mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
updating controller and auth, fixes #3539
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6036 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
01230b92b1
commit
d8e206b9f9
2 changed files with 2 additions and 5 deletions
|
@ -339,9 +339,6 @@ class AuthComponent extends Object {
|
|||
}
|
||||
$type = array('model' => $object);
|
||||
break;
|
||||
default:
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
|
||||
if ($this->isAuthorized($type)) {
|
||||
|
@ -419,7 +416,7 @@ class AuthComponent extends Object {
|
|||
case 'crud':
|
||||
$this->mapActions();
|
||||
if (!isset($this->actionMap[$this->params['action']])) {
|
||||
trigger_error(sprintf(__('Auth::startup() - Attempted access of un-mapped action "$1%s" in controller "$2%s"', true), $this->params['action'], $this->params['controller']), E_USER_WARNING);
|
||||
trigger_error(sprintf(__('Auth::startup() - Attempted access of un-mapped action "%1$s" in controller "%2$s"', true), $this->params['action'], $this->params['controller']), E_USER_WARNING);
|
||||
} else {
|
||||
$valid = $this->Acl->check($user, $this->action(':controller'), $this->actionMap[$this->params['action']]);
|
||||
}
|
||||
|
|
|
@ -881,7 +881,7 @@ class Controller extends Object {
|
|||
}
|
||||
|
||||
if (!is_object($object)) {
|
||||
trigger_error(sprintf(__("Controller::paginate() - can't find model %s in controller %sController", true), $object, $this->name), E_USER_WARNING);
|
||||
trigger_error(sprintf(__("Controller::paginate() - can't find model %1$s in controller %2$sController", true), $object, $this->name), E_USER_WARNING);
|
||||
return array();
|
||||
}
|
||||
$options = am($this->params, $this->params['url'], $this->passedArgs);
|
||||
|
|
Loading…
Add table
Reference in a new issue