mirror of
https://we.phorge.it/source/phorge.git
synced 2025-03-12 20:34:54 +01:00
(stable) Fix Phriction rendering for initial install and 404 pages
Summary: Depends on D19682. Ref T13202. We currently fatal when trying to render a timeline if: - an install is fresh, so there are no pages yet, and you look at "/w/"; or - you're looking at a Phriction page which doesn't exist (yet) like "/w/aadsflknadsflnf/". Rendering a timeline and comment area doesn't make sense in these cases, so don't render them. Test Plan: Hit both cases described above, got "new/empty page" prompts instead of fatals. Reviewers: amckinley Maniphest Tasks: T13202 Differential Revision: https://secure.phabricator.com/D19683
This commit is contained in:
parent
f2d9d93626
commit
8ab7859d85
1 changed files with 13 additions and 8 deletions
|
@ -377,6 +377,7 @@ final class PhrictionDocumentController
|
||||||
$page_content->setCurtain($curtain);
|
$page_content->setCurtain($curtain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($document->getPHID()) {
|
||||||
$timeline = $this->buildTransactionTimeline(
|
$timeline = $this->buildTransactionTimeline(
|
||||||
$document,
|
$document,
|
||||||
new PhrictionTransactionQuery());
|
new PhrictionTransactionQuery());
|
||||||
|
@ -387,6 +388,10 @@ final class PhrictionDocumentController
|
||||||
|
|
||||||
$comment_view = $edit_engine
|
$comment_view = $edit_engine
|
||||||
->buildEditEngineCommentView($document);
|
->buildEditEngineCommentView($document);
|
||||||
|
} else {
|
||||||
|
$timeline = null;
|
||||||
|
$comment_view = null;
|
||||||
|
}
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($page_title)
|
->setTitle($page_title)
|
||||||
|
|
Loading…
Add table
Reference in a new issue