Differential D9513 Diff 22796 src/applications/diffusion/controller/DiffusionMirrorEditController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionMirrorEditController.php
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | $credentials = id(new PassphraseCredentialQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->withIsDestroyed(false) | ->withIsDestroyed(false) | ||||
->execute(); | ->execute(); | ||||
$errors = array(); | $errors = array(); | ||||
if ($request->isFormPost()) { | if ($request->isFormPost()) { | ||||
$v_remote = $request->getStr('remoteURI'); | $v_remote = $request->getStr('remoteURI'); | ||||
if (strlen($v_remote)) { | if (strlen($v_remote)) { | ||||
try { | |||||
PhabricatorRepository::assertValidRemoteURI($v_remote); | |||||
$e_remote = null; | $e_remote = null; | ||||
} catch (Exception $ex) { | |||||
$e_remote = pht('Invalid'); | |||||
$errors[] = $ex->getMessage(); | |||||
} | |||||
} else { | } else { | ||||
$e_remote = pht('Required'); | $e_remote = pht('Required'); | ||||
$errors[] = pht('You must provide a remote URI.'); | $errors[] = pht('You must provide a remote URI.'); | ||||
} | } | ||||
$v_credentials = $request->getStr('credential'); | $v_credentials = $request->getStr('credential'); | ||||
if ($v_credentials) { | if ($v_credentials) { | ||||
$phids = mpull($credentials, null, 'getPHID'); | $phids = mpull($credentials, null, 'getPHID'); | ||||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |