Page MenuHomePhabricator

D10488.diff
No OneTemporary

D10488.diff

diff --git a/src/applications/files/controller/PhabricatorFileCommentController.php b/src/applications/files/controller/PhabricatorFileCommentController.php
--- a/src/applications/files/controller/PhabricatorFileCommentController.php
+++ b/src/applications/files/controller/PhabricatorFileCommentController.php
@@ -58,8 +58,7 @@
return id(new PhabricatorApplicationTransactionResponse())
->setViewer($user)
->setTransactions($xactions)
- ->setIsPreview($is_preview)
- ->setAnchorOffset($request->getStr('anchor'));
+ ->setIsPreview($is_preview);
} else {
return id(new AphrontRedirectResponse())
->setURI($view_uri);
diff --git a/src/applications/legalpad/controller/LegalpadDocumentCommentController.php b/src/applications/legalpad/controller/LegalpadDocumentCommentController.php
--- a/src/applications/legalpad/controller/LegalpadDocumentCommentController.php
+++ b/src/applications/legalpad/controller/LegalpadDocumentCommentController.php
@@ -69,8 +69,7 @@
return id(new PhabricatorApplicationTransactionResponse())
->setViewer($user)
->setTransactions($xactions)
- ->setIsPreview($is_preview)
- ->setAnchorOffset($request->getStr('anchor'));
+ ->setIsPreview($is_preview);
} else {
return id(new AphrontRedirectResponse())->setURI($document_uri);
}
diff --git a/src/applications/macro/controller/PhabricatorMacroCommentController.php b/src/applications/macro/controller/PhabricatorMacroCommentController.php
--- a/src/applications/macro/controller/PhabricatorMacroCommentController.php
+++ b/src/applications/macro/controller/PhabricatorMacroCommentController.php
@@ -59,8 +59,7 @@
return id(new PhabricatorApplicationTransactionResponse())
->setViewer($user)
->setTransactions($xactions)
- ->setIsPreview($is_preview)
- ->setAnchorOffset($request->getStr('anchor'));
+ ->setIsPreview($is_preview);
} else {
return id(new AphrontRedirectResponse())
->setURI($view_uri);
diff --git a/src/applications/paste/controller/PhabricatorPasteCommentController.php b/src/applications/paste/controller/PhabricatorPasteCommentController.php
--- a/src/applications/paste/controller/PhabricatorPasteCommentController.php
+++ b/src/applications/paste/controller/PhabricatorPasteCommentController.php
@@ -59,8 +59,7 @@
return id(new PhabricatorApplicationTransactionResponse())
->setViewer($user)
->setTransactions($xactions)
- ->setIsPreview($is_preview)
- ->setAnchorOffset($request->getStr('anchor'));
+ ->setIsPreview($is_preview);
} else {
return id(new AphrontRedirectResponse())
->setURI($view_uri);
diff --git a/src/applications/pholio/controller/PholioMockCommentController.php b/src/applications/pholio/controller/PholioMockCommentController.php
--- a/src/applications/pholio/controller/PholioMockCommentController.php
+++ b/src/applications/pholio/controller/PholioMockCommentController.php
@@ -81,8 +81,7 @@
->setViewer($user)
->setTransactions($xactions)
->setTransactionView($xaction_view)
- ->setIsPreview($is_preview)
- ->setAnchorOffset($request->getStr('anchor'));
+ ->setIsPreview($is_preview);
} else {
return id(new AphrontRedirectResponse())->setURI($mock_uri);
}
diff --git a/src/applications/ponder/controller/PonderAnswerCommentController.php b/src/applications/ponder/controller/PonderAnswerCommentController.php
--- a/src/applications/ponder/controller/PonderAnswerCommentController.php
+++ b/src/applications/ponder/controller/PonderAnswerCommentController.php
@@ -60,8 +60,7 @@
return id(new PhabricatorApplicationTransactionResponse())
->setViewer($viewer)
->setTransactions($xactions)
- ->setIsPreview($is_preview)
- ->setAnchorOffset($request->getStr('anchor'));
+ ->setIsPreview($is_preview);
} else {
return id(new AphrontRedirectResponse())
->setURI($view_uri);
diff --git a/src/applications/ponder/controller/PonderQuestionCommentController.php b/src/applications/ponder/controller/PonderQuestionCommentController.php
--- a/src/applications/ponder/controller/PonderQuestionCommentController.php
+++ b/src/applications/ponder/controller/PonderQuestionCommentController.php
@@ -59,8 +59,7 @@
return id(new PhabricatorApplicationTransactionResponse())
->setViewer($viewer)
->setTransactions($xactions)
- ->setIsPreview($is_preview)
- ->setAnchorOffset($request->getStr('anchor'));
+ ->setIsPreview($is_preview);
} else {
return id(new AphrontRedirectResponse())
->setURI($view_uri);
diff --git a/src/applications/releeph/controller/request/ReleephRequestCommentController.php b/src/applications/releeph/controller/request/ReleephRequestCommentController.php
--- a/src/applications/releeph/controller/request/ReleephRequestCommentController.php
+++ b/src/applications/releeph/controller/request/ReleephRequestCommentController.php
@@ -59,8 +59,7 @@
return id(new PhabricatorApplicationTransactionResponse())
->setViewer($viewer)
->setTransactions($xactions)
- ->setIsPreview($is_preview)
- ->setAnchorOffset($request->getStr('anchor'));
+ ->setIsPreview($is_preview);
} else {
return id(new AphrontRedirectResponse())
->setURI($view_uri);
diff --git a/src/applications/slowvote/controller/PhabricatorSlowvoteCommentController.php b/src/applications/slowvote/controller/PhabricatorSlowvoteCommentController.php
--- a/src/applications/slowvote/controller/PhabricatorSlowvoteCommentController.php
+++ b/src/applications/slowvote/controller/PhabricatorSlowvoteCommentController.php
@@ -59,8 +59,7 @@
return id(new PhabricatorApplicationTransactionResponse())
->setViewer($user)
->setTransactions($xactions)
- ->setIsPreview($is_preview)
- ->setAnchorOffset($request->getStr('anchor'));
+ ->setIsPreview($is_preview);
} else {
return id(new AphrontRedirectResponse())
->setURI($view_uri);
diff --git a/src/applications/transactions/response/PhabricatorApplicationTransactionResponse.php b/src/applications/transactions/response/PhabricatorApplicationTransactionResponse.php
--- a/src/applications/transactions/response/PhabricatorApplicationTransactionResponse.php
+++ b/src/applications/transactions/response/PhabricatorApplicationTransactionResponse.php
@@ -5,7 +5,6 @@
private $viewer;
private $transactions;
- private $anchorOffset;
private $isPreview;
private $transactionView;
@@ -22,15 +21,6 @@
return new AphrontAjaxResponse();
}
- public function setAnchorOffset($anchor_offset) {
- $this->anchorOffset = $anchor_offset;
- return $this;
- }
-
- public function getAnchorOffset() {
- return $this->anchorOffset;
- }
-
public function setTransactions($transactions) {
assert_instances_of($transactions, 'PhabricatorApplicationTransaction');
@@ -71,10 +61,6 @@
->setTransactions($this->getTransactions())
->setIsPreview($this->isPreview);
- if ($this->getAnchorOffset()) {
- $view->setAnchorOffset($this->getAnchorOffset());
- }
-
if ($this->isPreview) {
$xactions = mpull($view->buildEvents(), 'render');
} else {
diff --git a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php
--- a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php
+++ b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php
@@ -445,6 +445,14 @@
return true;
break;
case PhabricatorObjectMentionedByObject::EDGECONST:
+ $new = ipull($this->getNewValue(), 'dst');
+ $old = ipull($this->getOldValue(), 'dst');
+ $add = array_diff($new, $old);
+ $add_value = reset($add);
+ $add_handle = $this->getHandle($add_value);
+ if ($add_handle->getPolicyFiltered()) {
+ return true;
+ }
return false;
break;
default:
diff --git a/src/applications/transactions/view/PhabricatorApplicationTransactionView.php b/src/applications/transactions/view/PhabricatorApplicationTransactionView.php
--- a/src/applications/transactions/view/PhabricatorApplicationTransactionView.php
+++ b/src/applications/transactions/view/PhabricatorApplicationTransactionView.php
@@ -7,7 +7,6 @@
private $transactions;
private $engine;
- private $anchorOffset = 1;
private $showEditActions = true;
private $isPreview;
private $objectPHID;
@@ -56,11 +55,6 @@
return $this->showEditActions;
}
- public function setAnchorOffset($anchor_offset) {
- $this->anchorOffset = $anchor_offset;
- return $this;
- }
-
public function setMarkupEngine(PhabricatorMarkupEngine $engine) {
$this->engine = $engine;
return $this;
@@ -80,8 +74,6 @@
public function buildEvents($with_hiding = false) {
$user = $this->getUser();
- $anchor = $this->anchorOffset;
-
$xactions = $this->transactions;
$xactions = $this->filterHiddenTransactions($xactions);
@@ -130,9 +122,8 @@
$group_event = null;
foreach ($group as $xaction) {
- $event = $this->renderEvent($xaction, $group, $anchor);
+ $event = $this->renderEvent($xaction, $group);
$event->setHideByDefault($hide_by_default);
- $anchor++;
if (!$group_event) {
$group_event = $event;
} else {
@@ -325,8 +316,7 @@
private function renderEvent(
PhabricatorApplicationTransaction $xaction,
- array $group,
- $anchor) {
+ array $group) {
$viewer = $this->getUser();
$event = id(new PHUITimelineEventView())
@@ -370,7 +360,7 @@
$event
->setDateCreated($xaction->getDateCreated())
->setContentSource($xaction->getContentSource())
- ->setAnchor($anchor);
+ ->setAnchor($xaction->getID());
}
$transaction_type = $xaction->getTransactionType();

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 12:12 PM (20 h, 48 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6910343
Default Alt Text
D10488.diff (10 KB)

Event Timeline