Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phame/controller/blog/PhameBlogViewController.php
| Show All 13 Lines | public function handleRequest(AphrontRequest $request) { | ||||
| $is_live = $this->getIsLive(); | $is_live = $this->getIsLive(); | ||||
| $is_external = $this->getIsExternal(); | $is_external = $this->getIsExternal(); | ||||
| $pager = id(new AphrontCursorPagerView()) | $pager = id(new AphrontCursorPagerView()) | ||||
| ->readFromRequest($request); | ->readFromRequest($request); | ||||
| $post_query = id(new PhamePostQuery()) | $post_query = id(new PhamePostQuery()) | ||||
| ->setViewer($viewer) | ->setViewer($viewer) | ||||
| ->withBlogPHIDs(array($blog->getPHID())); | ->withBlogPHIDs(array($blog->getPHID())) | ||||
| ->withVisibility(array( | |||||
| PhameConstants::VISIBILITY_PUBLISHED, | |||||
| PhameConstants::VISIBILITY_DRAFT, | |||||
| )); | |||||
| if ($is_live) { | if ($is_live) { | ||||
| $post_query->withVisibility(PhameConstants::VISIBILITY_PUBLISHED); | $post_query->withVisibility(array(PhameConstants::VISIBILITY_PUBLISHED)); | ||||
| } | } | ||||
| $posts = $post_query->executeWithCursorPager($pager); | $posts = $post_query->executeWithCursorPager($pager); | ||||
| $header = id(new PHUIHeaderView()) | $header = id(new PHUIHeaderView()) | ||||
| ->setHeader($blog->getName()) | ->setHeader($blog->getName()) | ||||
| ->setUser($viewer); | ->setUser($viewer); | ||||
| ▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines | |||||