@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove "Moved Document from ..." notice in Phriction

Summary:
Ref T13410. See PHI1431. Currently, when you move a document in Phriction, the target shows a "This document was moved from ..." banner until it is edited.

This banner isn't particularly useful, and it's distracting and it isn't obvious how to dismiss it, and making a trivial edit to dismiss it is awkward.

This information is also already available in the transaction log.

Just remove this banner since it doesn't really serve any clear purpose.

Test Plan:
- Moved a page in Phriction, then loaded the destination page. Before change: header banner. After change: nothing.
- Viewed a normal (non-moved) page, saw normal behavior.
- Reviewed transactions, saw "Moved from ..." in the timeline.

Maniphest Tasks: T13410

Differential Revision: https://secure.phabricator.com/D20800

+1 -32
-31
src/applications/phriction/controller/PhrictionDocumentController.php
··· 293 293 } else { 294 294 throw new Exception(pht("Unknown document status '%s'!", $doc_status)); 295 295 } 296 - 297 - $move_notice = null; 298 - if ($current_status == PhrictionChangeType::CHANGE_MOVE_HERE) { 299 - $from_doc_id = $content->getChangeRef(); 300 - 301 - $slug_uri = null; 302 - 303 - // If the old document exists and is visible, provide a link to it. 304 - $from_docs = id(new PhrictionDocumentQuery()) 305 - ->setViewer($viewer) 306 - ->withIDs(array($from_doc_id)) 307 - ->execute(); 308 - if ($from_docs) { 309 - $from_doc = head($from_docs); 310 - $slug_uri = PhrictionDocument::getSlugURI($from_doc->getSlug()); 311 - } 312 - 313 - $move_notice = id(new PHUIInfoView()) 314 - ->setSeverity(PHUIInfoView::SEVERITY_NOTICE); 315 - 316 - if ($slug_uri) { 317 - $move_notice->appendChild( 318 - pht( 319 - 'This document was moved from %s.', 320 - phutil_tag('a', array('href' => $slug_uri), $slug_uri))); 321 - } else { 322 - // Render this for consistency, even though it's a bit silly. 323 - $move_notice->appendChild( 324 - pht('This document was moved from elsewhere.')); 325 - } 326 - } 327 296 } 328 297 329 298 $children = $this->renderDocumentChildren($slug);
+1 -1
src/applications/phriction/xaction/PhrictionDocumentMoveToTransaction.php
··· 49 49 $new = $this->getNewValue(); 50 50 51 51 return pht( 52 - '%s moved this document from %s', 52 + '%s moved this document from %s.', 53 53 $this->renderAuthor(), 54 54 $this->renderHandle($new['phid'])); 55 55 }