diff --git a/src/applications/diffusion/controller/DiffusionCommitController.php b/src/applications/diffusion/controller/DiffusionCommitController.php
index c448c56a27..8c0af087d0 100644
--- a/src/applications/diffusion/controller/DiffusionCommitController.php
+++ b/src/applications/diffusion/controller/DiffusionCommitController.php
@@ -86,7 +86,9 @@ final class DiffusionCommitController extends DiffusionController {
$commit_data,
$parent_query->loadParents());
$property_list = id(new PhabricatorPropertyListView())
- ->setHasKeyboardShortcuts(true);
+ ->setHasKeyboardShortcuts(true)
+ ->setUser($user)
+ ->setObject($commit);
foreach ($commit_properties as $key => $value) {
$property_list->addProperty($key, $value);
}
@@ -98,6 +100,7 @@ final class DiffusionCommitController extends DiffusionController {
$message = $engine->markupText($message);
+ $property_list->invokeWillRenderEvent();
$property_list->addTextContent(
phutil_tag(
'div',
@@ -105,7 +108,6 @@ final class DiffusionCommitController extends DiffusionController {
'class' => 'diffusion-commit-message phabricator-remarkup',
),
$message));
-
$content[] = $top_anchor;
$content[] = $headsup_view;
$content[] = $headsup_actions;
diff --git a/src/applications/paste/controller/PhabricatorPasteViewController.php b/src/applications/paste/controller/PhabricatorPasteViewController.php
index 85db9938df..f0e4c3f59c 100644
--- a/src/applications/paste/controller/PhabricatorPasteViewController.php
+++ b/src/applications/paste/controller/PhabricatorPasteViewController.php
@@ -120,7 +120,9 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController {
array $child_phids) {
$user = $this->getRequest()->getUser();
- $properties = new PhabricatorPropertyListView();
+ $properties = id(new PhabricatorPropertyListView())
+ ->setUser($user)
+ ->setObject($paste);
$properties->addProperty(
pht('Author'),
diff --git a/src/applications/paste/storage/PhabricatorPaste.php b/src/applications/paste/storage/PhabricatorPaste.php
index ba87def552..dc1d697e08 100644
--- a/src/applications/paste/storage/PhabricatorPaste.php
+++ b/src/applications/paste/storage/PhabricatorPaste.php
@@ -1,7 +1,7 @@
getAuthorPHID(),
+ );
+ }
+
}
diff --git a/src/applications/phame/controller/post/PhamePostViewController.php b/src/applications/phame/controller/post/PhamePostViewController.php
index e39176955a..1240351f11 100644
--- a/src/applications/phame/controller/post/PhamePostViewController.php
+++ b/src/applications/phame/controller/post/PhamePostViewController.php
@@ -162,7 +162,9 @@ final class PhamePostViewController extends PhameController {
PhamePost $post,
PhabricatorUser $user) {
- $properties = new PhabricatorPropertyListView();
+ $properties = id(new PhabricatorPropertyListView())
+ ->setUser($user)
+ ->setObject($post);
$descriptions = PhabricatorPolicyQuery::renderPolicyDescriptions(
$user,
@@ -193,6 +195,8 @@ final class PhamePostViewController extends PhameController {
->addObject($post, PhamePost::MARKUP_FIELD_BODY)
->process();
+ $properties->invokeWillRenderEvent();
+
$properties->addTextContent(
phutil_tag(
'div',
diff --git a/src/applications/phame/storage/PhamePost.php b/src/applications/phame/storage/PhamePost.php
index 62414a60ec..3809679c94 100644
--- a/src/applications/phame/storage/PhamePost.php
+++ b/src/applications/phame/storage/PhamePost.php
@@ -4,7 +4,10 @@
* @group phame
*/
final class PhamePost extends PhameDAO
- implements PhabricatorPolicyInterface, PhabricatorMarkupInterface {
+ implements
+ PhabricatorPolicyInterface,
+ PhabricatorMarkupInterface,
+ PhabricatorTokenReceiverInterface {
const MARKUP_FIELD_BODY = 'markup:body';
const MARKUP_FIELD_SUMMARY = 'markup:summary';
@@ -182,4 +185,12 @@ final class PhamePost extends PhameDAO
return (bool)$this->getPHID();
}
+/* -( PhabricatorTokenReceiverInterface )---------------------------------- */
+
+ public function getUsersToNotifyOfTokenGiven() {
+ return array(
+ $this->getBloggerPHID(),
+ );
+ }
+
}
diff --git a/src/applications/phriction/controller/PhrictionDocumentController.php b/src/applications/phriction/controller/PhrictionDocumentController.php
index 3cb431dbee..58e1252dab 100644
--- a/src/applications/phriction/controller/PhrictionDocumentController.php
+++ b/src/applications/phriction/controller/PhrictionDocumentController.php
@@ -31,8 +31,8 @@ final class PhrictionDocumentController
$version_note = null;
$core_content = '';
- $byline = '';
$move_notice = '';
+ $properties = null;
if (!$document) {
@@ -48,22 +48,17 @@ final class PhrictionDocumentController
}
$create_uri = '/phriction/edit/?slug='.$slug;
- $no_content_head = pht('No content here!');
- $no_content_body = pht(
- 'No document found at %s. You can '.
- 'create a new document here.',
- phutil_tag('tt', array(), $slug),
- $create_uri);
+ $notice = new AphrontErrorView();
+ $notice->setSeverity(AphrontErrorView::SEVERITY_NODATA);
+ $notice->setTitle(pht('No content here!'));
+ $notice->appendChild(
+ pht(
+ 'No document found at %s. You can '.
+ 'create a new document here.',
+ phutil_tag('tt', array(), $slug),
+ $create_uri));
+ $core_content = $notice;
- $no_content_text = hsprintf(
- '%s
%s',
- $no_content_head,
- $no_content_body);
-
- $page_content = phutil_tag(
- 'div',
- array('class' => 'phriction-content'),
- $no_content_text);
$page_title = pht('Page Not Found');
} else {
$version = $request->getInt('v');
@@ -90,75 +85,10 @@ final class PhrictionDocumentController
}
$page_title = $content->getTitle();
- $project_phid = null;
- if (PhrictionDocument::isProjectSlug($slug)) {
- $project = id(new PhabricatorProject())->loadOneWhere(
- 'phrictionSlug = %s',
- PhrictionDocument::getProjectSlugIdentifier($slug));
- if ($project) {
- $project_phid = $project->getPHID();
- }
- }
-
$subscribers = PhabricatorSubscribersQuery::loadSubscribersForPHID(
$document->getPHID());
-
- $phids = array_filter(
- array(
- $content->getAuthorPHID(),
- $project_phid,
- ));
-
- if ($subscribers) {
- $phids = array_merge($phids, $subscribers);
- }
-
- $handles = $this->loadViewerHandles($phids);
-
- $age = time() - $content->getDateCreated();
- $age = floor($age / (60 * 60 * 24));
-
- if ($age < 1) {
- $when = pht('today');
- } else if ($age == 1) {
- $when = pht('yesterday');
- } else {
- $when = pht("%d days ago", $age);
- }
-
-
- $project_info = null;
- if ($project_phid) {
- $project_info = hsprintf(
- '
%s',
- pht('This document is about the project %s.',
- $handles[$project_phid]->renderLink()));
- }
-
- $subscriber_view = null;
- if ($subscribers) {
- $subcriber_list = array();
- foreach ($subscribers as $subscriber) {
- $subcriber_list[] = $handles[$subscriber];
- }
-
- $subcriber_list = phutil_implode_html(', ',
- mpull($subcriber_list, 'renderLink'));
-
- $subscriber_view = array(
- hsprintf('
Subscribers: '),
- $subcriber_list,
- );
- }
-
- $byline = hsprintf(
- '