Something went wrong. Try again.
@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
Something went wrong. Try again.
1.7 kB · 51 lines
PHP
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152<?php
final class DiffusionRepositoryEditDeleteController extends DiffusionRepositoryManageController {
public function handleRequest(AphrontRequest $request) { // This is just an information box, telling admins to use CLI for destroy. // To increase shared knowledge about how Phorge works, we can safely show // it to those who see the repository, not just those who can edit it. $response = $this->loadDiffusionContext(); if ($response) { return $response; }
$viewer = $this->getViewer(); $drequest = $this->getDiffusionRequest(); $repository = $drequest->getRepository();
$panel_uri = id(new DiffusionRepositoryBasicsManagementPanel()) ->setRepository($repository) ->getPanelURI();
$doc_uri = PhabricatorEnv::getDoclink( 'Permanently Destroying Data');
return $this->newDialog() ->setTitle(pht('Delete Repository')) ->appendParagraph( pht( 'To permanently destroy this repository, run this command from '. 'the command line:')) ->appendCommand( csprintf( '%s $ ./bin/remove destroy %R', PlatformSymbols::getPlatformServerPath(), $repository->getMonogram())) ->appendParagraph( pht( 'Repositories can not be permanently destroyed from the web '. 'interface. See %s in the documentation for more information.', phutil_tag( 'a', array( 'href' => $doc_uri, 'target' => '_blank', ), pht('Permanently Destroying Data')))) ->addCancelButton($panel_uri, pht('Close')); }
}