1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 05:12:41 +01:00

Fix bad query on PhameHome with no Blogs

Summary: We're checking for drafts even though we already know there are no blogs, just skip the query.

Test Plan: trucate phame_blogs; See proper blank state.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14908
This commit is contained in:
Chad Little 2015-12-29 15:24:06 +00:00 committed by chad
parent 1443e4b13d
commit 7732f9c03c

View file

@ -85,7 +85,7 @@ final class PhameHomeController extends PhamePostController {
->setViewer($viewer); ->setViewer($viewer);
$draft_list = null; $draft_list = null;
if ($viewer->isLoggedIn()) { if ($viewer->isLoggedIn() && $blogs) {
$drafts = id(new PhamePostQuery()) $drafts = id(new PhamePostQuery())
->setViewer($viewer) ->setViewer($viewer)
->withBloggerPHIDs(array($viewer->getPHID())) ->withBloggerPHIDs(array($viewer->getPHID()))