1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 06:42:42 +01:00

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
This commit is contained in:
Andre Klapper 2024-05-11 16:32:08 +02:00
parent 50d0bbe8ff
commit d5295da072
3 changed files with 7 additions and 41 deletions

View file

@ -627,25 +627,4 @@ abstract class PhabricatorController extends AphrontController {
return $this->delegateToController($controller); return $this->delegateToController($controller);
} }
/* -( Deprecated )--------------------------------------------------------- */
/**
* DEPRECATED. Use @{method:newPage}.
*/
public function buildStandardPageView() {
return $this->newPage();
}
/**
* DEPRECATED. Use @{method:newPage}.
*/
public function buildStandardPageResponse($view, array $data) {
$page = $this->buildStandardPageView();
$page->appendChild($view);
return $page->produceAphrontResponse();
}
} }

View file

@ -1,18 +1,4 @@
<?php <?php
abstract class PhabricatorXHPASTViewController extends PhabricatorController { abstract class PhabricatorXHPASTViewController extends PhabricatorController {
public function buildStandardPageResponse($view, array $data) {
$page = $this->buildStandardPageView();
$page->setApplicationName('XHPASTView');
$page->setBaseURI('/xhpast/');
$page->setTitle(idx($data, 'title'));
$page->setGlyph("\xE2\x96\xA0");
$page->appendChild($view);
$response = new AphrontWebpageResponse();
return $response->setContent($page->render());
}
} }

View file

@ -10,17 +10,18 @@ final class PhabricatorXHPASTViewFrameController
public function handleRequest(AphrontRequest $request) { public function handleRequest(AphrontRequest $request) {
$id = $request->getURIData('id'); $id = $request->getURIData('id');
return $this->buildStandardPageResponse( return $this->newPage()
phutil_tag( ->setApplicationName('XHPASTView')
->setBaseURI('/xhpast/')
->setTitle(pht('XHPAST View'))
->setGlyph("\xE2\x96\xA0")
->appendChild(phutil_tag(
'iframe', 'iframe',
array( array(
'src' => "/xhpast/frameset/{$id}/", 'src' => "/xhpast/frameset/{$id}/",
'frameborder' => '0', 'frameborder' => '0',
'style' => 'width: 100%; height: 800px;', 'style' => 'width: 100%; height: 800px;',
'', '',
)), )));
array(
'title' => pht('XHPAST View'),
));
} }
} }