Skip to content

Commit

Permalink
Fix insights stream paging when logged out
Browse files Browse the repository at this point in the history
  • Loading branch information
ginatrapani committed Jul 30, 2012
1 parent ab18816 commit ea3565a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions webapp/_lib/controller/class.InsightStreamController.php
Expand Up @@ -43,8 +43,6 @@ public function control() {
///show all insights for all service users
$insights = $insight_dao->getAllInstanceInsights($page_count=10, $page);
$this->addToView('insights', $insights);
$this->addToView('next_page', $page+1);
$this->addToView('last_page', $page-1);
} else {
//show only service users owner owns
}
Expand All @@ -53,6 +51,10 @@ public function control() {
$insights = $insight_dao->getPublicInsights($page_count=10, $page);
$this->addToView('insights', $insights);
}
if (isset($insights) && sizeof($insights) > 0) {
$this->addToView('next_page', $page+1);
$this->addToView('last_page', $page-1);
}
}
return $this->generateView();
}
Expand Down

0 comments on commit ea3565a

Please sign in to comment.