@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Filter PhameHome on active blogs only

Summary: Fixes T9928. Not sure if this is best mechanic or add new methods to PhamePostQuery (a join?)

Test Plan: Archive a blog, don't see posts on PhameHome

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9928

Differential Revision: https://secure.phabricator.com/D14701

+18 -4
+18 -4
src/applications/phame/controller/PhameHomeController.php
··· 9 9 public function handleRequest(AphrontRequest $request) { 10 10 $viewer = $request->getViewer(); 11 11 12 + $blogs = id(new PhameBlogQuery()) 13 + ->setViewer($viewer) 14 + ->withStatuses(array(PhameBlog::STATUS_ACTIVE)) 15 + ->execute(); 16 + 17 + $blog_phids = mpull($blogs, 'getPHID'); 18 + 12 19 $pager = id(new AphrontCursorPagerView()) 13 20 ->readFromRequest($request); 14 21 15 22 $posts = id(new PhamePostQuery()) 16 23 ->setViewer($viewer) 24 + ->withBlogPHIDs($blog_phids) 17 25 ->withVisibility(PhameConstants::VISIBILITY_PUBLISHED) 18 26 ->executeWithCursorPager($pager); 19 27 20 28 $actions = $this->renderActions($viewer); 21 29 $action_button = id(new PHUIButtonView()) 22 30 ->setTag('a') 23 - ->setText(pht('Search')) 31 + ->setText(pht('Actions')) 24 32 ->setHref('#') 25 - ->setIconFont('fa-search') 33 + ->setIconFont('fa-bars') 26 34 ->addClass('phui-mobile-menu') 27 35 ->setDropdownMenu($actions); 28 36 ··· 65 73 66 74 $actions->addAction( 67 75 id(new PhabricatorActionView()) 76 + ->setIcon('fa-pencil') 77 + ->setHref($this->getApplicationURI('post/query/draft/')) 78 + ->setName(pht('My Drafts'))); 79 + 80 + $actions->addAction( 81 + id(new PhabricatorActionView()) 68 82 ->setIcon('fa-pencil-square-o') 69 83 ->setHref($this->getApplicationURI('post/')) 70 - ->setName(pht('Find Posts'))); 84 + ->setName(pht('All Posts'))); 71 85 72 86 $actions->addAction( 73 87 id(new PhabricatorActionView()) 74 88 ->setIcon('fa-star') 75 89 ->setHref($this->getApplicationURI('blog/')) 76 - ->setName(pht('Find Blogs'))); 90 + ->setName(pht('Active Blogs'))); 77 91 78 92 return $actions; 79 93 }