Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15434002
D8793.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D8793.diff
View Options
diff --git a/src/aphront/response/AphrontPlainTextResponse.php b/src/aphront/response/AphrontPlainTextResponse.php
--- a/src/aphront/response/AphrontPlainTextResponse.php
+++ b/src/aphront/response/AphrontPlainTextResponse.php
@@ -16,7 +16,7 @@
public function getHeaders() {
$headers = array(
- array('Content-Type', 'text/plain'),
+ array('Content-Type', 'text/plain; charset=utf-8'),
);
return array_merge(parent::getHeaders(), $headers);
diff --git a/src/applications/feed/conduit/ConduitAPI_feed_query_Method.php b/src/applications/feed/conduit/ConduitAPI_feed_query_Method.php
--- a/src/applications/feed/conduit/ConduitAPI_feed_query_Method.php
+++ b/src/applications/feed/conduit/ConduitAPI_feed_query_Method.php
@@ -95,7 +95,14 @@
$data = null;
- $view = $story->renderView();
+ try {
+ $view = $story->renderView();
+ } catch (Exception $ex) {
+ // When stories fail to render, just fail that story.
+ phlog($ex);
+ continue;
+ }
+
$view->setEpoch($story->getEpoch());
$view->setUser($user);
diff --git a/src/applications/feed/controller/PhabricatorFeedDetailController.php b/src/applications/feed/controller/PhabricatorFeedDetailController.php
--- a/src/applications/feed/controller/PhabricatorFeedDetailController.php
+++ b/src/applications/feed/controller/PhabricatorFeedDetailController.php
@@ -20,6 +20,11 @@
return new Aphront404Response();
}
+ if ($request->getStr('text')) {
+ $text = $story->renderText();
+ return id(new AphrontPlainTextResponse())->setContent($text);
+ }
+
$feed = array($story);
$builder = new PhabricatorFeedBuilder($feed);
$builder->setUser($user);
@@ -32,7 +37,6 @@
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb($title);
-
return $this->buildApplicationPage(
array(
$crumbs,
diff --git a/src/applications/feed/story/PhabricatorFeedStoryCommit.php b/src/applications/feed/story/PhabricatorFeedStoryCommit.php
--- a/src/applications/feed/story/PhabricatorFeedStoryCommit.php
+++ b/src/applications/feed/story/PhabricatorFeedStoryCommit.php
@@ -90,10 +90,16 @@
}
if ($author) {
- $text = "{$committer} (authored by {$author})".
- "committed {$commit_name} {$commit_uri}";
+ $text = pht(
+ '%s committed %s (authored by %s).',
+ $committer,
+ $commit_name,
+ $author);
} else {
- $text = "{$committer} committed {$commit_name} {$commit_uri}";
+ $text = pht(
+ '%s committed %s.',
+ $committer,
+ $commit_name);
}
return $text;
diff --git a/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php b/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php
--- a/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php
+++ b/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php
@@ -69,6 +69,7 @@
$old_target = $xaction->getRenderingTarget();
$new_target = PhabricatorApplicationTransaction::TARGET_TEXT;
$xaction->setRenderingTarget($new_target);
+ $xaction->setHandles($this->getHandles());
$text = $xaction->getTitleForFeed($this);
$xaction->setRenderingTarget($old_target);
return $text;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 26, 1:30 AM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7704133
Default Alt Text
D8793.diff (3 KB)
Attached To
Mode
D8793: Improve robustnesss of feed text rendering
Attached
Detach File
Event Timeline
Log In to Comment