mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-04 18:42:40 +00:00
Fix whitespace and remove duplicate method calls.
This commit is contained in:
parent
eeec362741
commit
15c94dee4d
2 changed files with 10 additions and 6 deletions
|
@ -223,13 +223,17 @@ class Permission extends AppModel {
|
|||
if (empty($obj['Aro']) || empty($obj['Aco'])) {
|
||||
return false;
|
||||
}
|
||||
$aro = Hash::extract($obj, 'Aro.0.' . $this->Aro->alias . '.id');
|
||||
$aco = Hash::extract($obj, 'Aco.0.' . $this->Aco->alias . '.id');
|
||||
$aro = current($aro);
|
||||
$aco = current($aco);
|
||||
|
||||
return array(
|
||||
'aro' => current(Hash::extract($obj, 'Aro.0.' . $this->Aro->alias . '.id')),
|
||||
'aco' => current(Hash::extract($obj, 'Aco.0.' . $this->Aco->alias . '.id')),
|
||||
'aro' => $aro,
|
||||
'aco' => $aco,
|
||||
'link' => $this->find('all', array('conditions' => array(
|
||||
$this->alias . '.aro_id' => current(Hash::extract($obj, 'Aro.0.' . $this->Aro->alias . '.id')),
|
||||
$this->alias . '.aco_id' => current(Hash::extract($obj, 'Aco.0.' . $this->Aco->alias . '.id'))
|
||||
$this->alias . '.aro_id' => $aro,
|
||||
$this->alias . '.aco_id' => $aco
|
||||
)))
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue