@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

Remove deprecated buildStandardPage* method calls

Summary:
Remove deprecated `buildStandardPageView()` and `buildStandardPageResponse()` methods.
They have been deprecated since rP300c74c49dc9d9f3ef1d7bbcc1b2400a3ded0c41 in November 2015.
cf rPd26cca27d70b69080c10e1df92a10419fffbfc7e, rP1b00ef08a039d48adb6bbbcd6956f900b6303b5b.

Test Plan: Compare http://phorge.localhost/xhpast/ before and after; paste and parse some PHP code into http://phorge.localhost/xhpast/; compare resulting http://phorge.localhost/xhpast/view/1/ before and after. Spot no differences and see no errors in DarkConsole.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25634

+7 -41
-21
src/applications/base/controller/PhabricatorController.php
··· 627 627 return $this->delegateToController($controller); 628 628 } 629 629 630 - 631 - /* -( Deprecated )--------------------------------------------------------- */ 632 - 633 - 634 - /** 635 - * DEPRECATED. Use @{method:newPage}. 636 - */ 637 - public function buildStandardPageView() { 638 - return $this->newPage(); 639 - } 640 - 641 - 642 - /** 643 - * DEPRECATED. Use @{method:newPage}. 644 - */ 645 - public function buildStandardPageResponse($view, array $data) { 646 - $page = $this->buildStandardPageView(); 647 - $page->appendChild($view); 648 - return $page->produceAphrontResponse(); 649 - } 650 - 651 630 }
-14
src/applications/phpast/controller/PhabricatorXHPASTViewController.php
··· 1 1 <?php 2 2 3 3 abstract class PhabricatorXHPASTViewController extends PhabricatorController { 4 - 5 - public function buildStandardPageResponse($view, array $data) { 6 - $page = $this->buildStandardPageView(); 7 - 8 - $page->setApplicationName('XHPASTView'); 9 - $page->setBaseURI('/xhpast/'); 10 - $page->setTitle(idx($data, 'title')); 11 - $page->setGlyph("\xE2\x96\xA0"); 12 - $page->appendChild($view); 13 - 14 - $response = new AphrontWebpageResponse(); 15 - return $response->setContent($page->render()); 16 - } 17 - 18 4 }
+7 -6
src/applications/phpast/controller/PhabricatorXHPASTViewFrameController.php
··· 10 10 public function handleRequest(AphrontRequest $request) { 11 11 $id = $request->getURIData('id'); 12 12 13 - return $this->buildStandardPageResponse( 14 - phutil_tag( 13 + return $this->newPage() 14 + ->setApplicationName('XHPASTView') 15 + ->setBaseURI('/xhpast/') 16 + ->setTitle(pht('XHPAST View')) 17 + ->setGlyph("\xE2\x96\xA0") 18 + ->appendChild(phutil_tag( 15 19 'iframe', 16 20 array( 17 21 'src' => "/xhpast/frameset/{$id}/", 18 22 'frameborder' => '0', 19 23 'style' => 'width: 100%; height: 800px;', 20 24 '', 21 - )), 22 - array( 23 - 'title' => pht('XHPAST View'), 24 - )); 25 + ))); 25 26 } 26 27 }