Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14069504
D7580.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D7580.diff
View Options
Index: src/applications/diffusion/controller/DiffusionRepositoryEditLocalController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionRepositoryEditLocalController.php
+++ src/applications/diffusion/controller/DiffusionRepositoryEditLocalController.php
@@ -26,41 +26,8 @@
$edit_uri = $this->getRepositoryControllerURI($repository, 'edit/');
$v_local = $repository->getHumanReadableDetail('local-path');
- $e_local = true;
$errors = array();
- if ($request->isFormPost()) {
- $v_local = $request->getStr('local');
-
- if (!strlen($v_local)) {
- $e_local = pht('Required');
- $errors[] = pht('You must specify a local path.');
- }
-
- if (!$errors) {
- $xactions = array();
- $template = id(new PhabricatorRepositoryTransaction());
-
- $type_local = PhabricatorRepositoryTransaction::TYPE_LOCAL_PATH;
-
- $xactions[] = id(clone $template)
- ->setTransactionType($type_local)
- ->setNewValue($v_local);
-
- try {
- id(new PhabricatorRepositoryEditor())
- ->setContinueOnNoEffect(true)
- ->setContentSourceFromRequest($request)
- ->setActor($user)
- ->applyTransactions($repository, $xactions);
-
- return id(new AphrontRedirectResponse())->setURI($edit_uri);
- } catch (Exception $ex) {
- $errors[] = $ex->getMessage();
- }
- }
- }
-
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
@@ -79,18 +46,19 @@
->setUser($user)
->appendRemarkupInstructions(
pht(
- 'You can adjust the local path for this repository here. This is '.
- 'an advanced setting and you usually should not change it.'))
+ "You can not adjust the local path for this repository from the ".
+ "web interface. To edit it, run this command:\n\n".
+ " phabricator/ $ ./bin/repository edit %s --as %s --local-path ...",
+ $repository->getCallsign(),
+ $user->getUsername()))
->appendChild(
- id(new AphrontFormTextControl())
+ id(new AphrontFormMarkupControl())
->setName('local')
->setLabel(pht('Local Path'))
- ->setValue($v_local)
- ->setError($e_local))
+ ->setValue($v_local))
->appendChild(
id(new AphrontFormSubmitControl())
- ->setValue(pht('Save Local'))
- ->addCancelButton($edit_uri));
+ ->addCancelButton($edit_uri, pht('Done')));
$object_box = id(new PHUIObjectBoxView())
->setHeaderText($title)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 21, 7:38 AM (18 h, 54 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6721356
Default Alt Text
D7580.diff (2 KB)
Attached To
Mode
D7580: Prevent Repository local path edit from the web UI
Attached
Detach File
Event Timeline
Log In to Comment