Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

update variable name : $myParams to $pageParams #7425

Merged
merged 2 commits into from
May 6, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions library/Zend/Navigation/Page/Mvc.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,18 @@ public function isActive($recursive = false)
$reqParams['controller'] = $reqParams[ModuleRouteListener::ORIGINAL_CONTROLLER];
}

$myParams = $this->params;
$pageParams = $this->params;
if (null !== $this->controller) {
$myParams['controller'] = $this->controller;
$pageParams['controller'] = $this->controller;
}
if (null !== $this->action) {
$myParams['action'] = $this->action;
$pageParams['action'] = $this->action;
}

if (null !== $this->getRoute()) {
if (
$this->routeMatch->getMatchedRouteName() === $this->getRoute()
&& (count(array_intersect_assoc($reqParams, $myParams)) == count($myParams))
&& (count(array_intersect_assoc($reqParams, $pageParams)) == count($pageParams))
) {
$this->active = true;
return $this->active;
Expand All @@ -151,27 +151,27 @@ public function isActive($recursive = false)
}
}

$myParams = $this->params;
$pageParams = $this->params;

if (null !== $this->controller) {
$myParams['controller'] = $this->controller;
$pageParams['controller'] = $this->controller;
} else {
/**
* @todo In ZF1, this was configurable and pulled from the front controller
*/
$myParams['controller'] = 'index';
$pageParams['controller'] = 'index';
}

if (null !== $this->action) {
$myParams['action'] = $this->action;
$pageParams['action'] = $this->action;
} else {
/**
* @todo In ZF1, this was configurable and pulled from the front controller
*/
$myParams['action'] = 'index';
$pageParams['action'] = 'index';
}

if (count(array_intersect_assoc($reqParams, $myParams)) == count($myParams)) {
if (count(array_intersect_assoc($reqParams, $pageParams)) == count($pageParams)) {
$this->active = true;
return true;
}
Expand Down