Path: blob/master/src/applications/diffusion/controller/DiffusionRepositoryEditUpdateController.php
12242 views
<?php12final class DiffusionRepositoryEditUpdateController3extends DiffusionRepositoryManageController {45public function handleRequest(AphrontRequest $request) {6$response = $this->loadDiffusionContextForEdit();7if ($response) {8return $response;9}1011$viewer = $this->getViewer();12$drequest = $this->getDiffusionRequest();13$repository = $drequest->getRepository();1415$panel_uri = id(new DiffusionRepositoryBasicsManagementPanel())16->setRepository($repository)17->getPanelURI();1819if ($request->isFormPost()) {20$params = array(21'repositories' => array(22$repository->getPHID(),23),24);2526id(new ConduitCall('diffusion.looksoon', $params))27->setUser($viewer)28->execute();2930return id(new AphrontRedirectResponse())->setURI($panel_uri);31}3233$doc_name = 'Diffusion User Guide: Repository Updates';34$doc_href = PhabricatorEnv::getDoclink($doc_name);35$doc_link = phutil_tag(36'a',37array(38'href' => $doc_href,39'target' => '_blank',40),41$doc_name);4243return $this->newDialog()44->setTitle(pht('Update Repository Now'))45->appendParagraph(46pht(47'Normally, repositories are automatically updated '.48'based on how much time has elapsed since the last commit. '.49'This helps reduce load if you have a large number of mostly '.50'inactive repositories, which is common.'))51->appendParagraph(52pht(53'You can manually schedule an update for this repository. The '.54'daemons will perform the update as soon as possible. This may '.55'be helpful if you have just made a commit to a rarely used '.56'repository.'))57->appendParagraph(58pht(59'To learn more about how repositories are updated, '.60'read %s in the documentation.',61$doc_link))62->addCancelButton($panel_uri)63->addSubmitButton(pht('Schedule Update'));64}656667}686970