Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

Commit

Permalink
fix(router): variable mismatch causes broken pages
Browse files Browse the repository at this point in the history
  • Loading branch information
hypeJunction committed Oct 20, 2015
1 parent 4581d4a commit 548eb0e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions classes/hypeJunction/Wall/Router.php
Expand Up @@ -48,7 +48,7 @@ public function handlePages($segments) {

case 'post' :

$guid = elgg_extract(1, $page);
$guid = elgg_extract(1, $segments);

elgg_entity_gatekeeper($guid, 'object');

Expand All @@ -58,7 +58,7 @@ public function handlePages($segments) {

case 'group' :
case 'container' :
$guid = elgg_extract(1, $page);
$guid = elgg_extract(1, $segments);

elgg_entity_gatekeeper($guid);

Expand All @@ -68,9 +68,9 @@ public function handlePages($segments) {

$name = elgg_instanceof($group, 'object') ? $group->title : $group->name;
$title = elgg_echo('wall:owner', array($name));
elgg_push_breadcrumb($title, $this->normalize($page[0], $group->guid));
elgg_push_breadcrumb($title, $this->normalize($segments[0], $group->guid));

if (isset($page[2])) {
if (isset($segments[2])) {
elgg_entity_gatekeeper($page[2]);
$post = get_entity($page[2]);
}
Expand Down

0 comments on commit 548eb0e

Please sign in to comment.