Make deleting a blog a little easier to recover from
Summary: We currently orphan posts when you delete a blog. Fixes some visibility and permission errors when that happens. Also... should allow you to archive posts. Test Plan: Delete a blog, visit a post I made, still can see it. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T9360 Differential Revision: https://secure.phabricator.com/D14457
This commit is contained in:
@@ -17,9 +17,15 @@ final class PhamePostViewController extends PhamePostController {
|
||||
$blog = $post->getBlog();
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb(
|
||||
$blog->getName(),
|
||||
$this->getApplicationURI('blog/view/'.$blog->getID().'/'));
|
||||
if ($blog) {
|
||||
$crumbs->addTextCrumb(
|
||||
$blog->getName(),
|
||||
$this->getApplicationURI('blog/view/'.$blog->getID().'/'));
|
||||
} else {
|
||||
$crumbs->addTextCrumb(
|
||||
pht('[No Blog]'),
|
||||
null);
|
||||
}
|
||||
$crumbs->addTextCrumb(
|
||||
$post->getTitle(),
|
||||
$this->getApplicationURI('post/view/'.$post->getID().'/'));
|
||||
|
||||
Reference in New Issue
Block a user