Page MenuHomePhabricator

D20184.diff
No OneTemporary

D20184.diff

diff --git a/src/applications/phriction/editor/PhrictionTransactionEditor.php b/src/applications/phriction/editor/PhrictionTransactionEditor.php
--- a/src/applications/phriction/editor/PhrictionTransactionEditor.php
+++ b/src/applications/phriction/editor/PhrictionTransactionEditor.php
@@ -229,9 +229,14 @@
foreach ($xactions as $xaction) {
switch ($xaction->getTransactionType()) {
case PhrictionDocumentContentTransaction::TRANSACTIONTYPE:
- $uri = id(new PhutilURI('/phriction/diff/'.$object->getID().'/'))
- ->alter('l', $this->getOldContent()->getVersion())
- ->alter('r', $this->getNewContent()->getVersion());
+ $params = array(
+ 'l' => $this->getOldContent()->getVersion(),
+ 'r' => $this->getNewContent()->getVersion(),
+ );
+
+ $path = '/phriction/diff/'.$object->getID().'/';
+ $uri = new PhutilURI($path, $params);
+
$this->contentDiffURI = (string)$uri;
break 2;
default:
diff --git a/src/view/phui/PHUITimelineView.php b/src/view/phui/PHUITimelineView.php
--- a/src/view/phui/PHUITimelineView.php
+++ b/src/view/phui/PHUITimelineView.php
@@ -154,8 +154,21 @@
}
$uri = $this->getPager()->getNextPageURI();
- $uri->replaceQueryParam('quoteTargetID', $this->getQuoteTargetID());
- $uri->replaceQueryParam('quoteRef', $this->getQuoteRef());
+
+ $target_id = $this->getQuoteTargetID();
+ if ($target_id === null) {
+ $uri->removeQueryParam('quoteTargetID');
+ } else {
+ $uri->replaceQueryParam('quoteTargetID', $target_id);
+ }
+
+ $quote_ref = $this->getQuoteRef();
+ if ($quote_ref === null) {
+ $uri->removeQueryParam('quoteRef');
+ } else {
+ $uri->replaceQueryParam('quoteRef', $quote_ref);
+ }
+
$events[] = javelin_tag(
'div',
array(

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 9, 3:46 PM (2 d, 9 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7389577
Default Alt Text
D20184.diff (1 KB)

Event Timeline