Page MenuHomePhabricator

D10841.id26021.diff
No OneTemporary

D10841.id26021.diff

diff --git a/src/applications/config/controller/PhabricatorConfigEditController.php b/src/applications/config/controller/PhabricatorConfigEditController.php
--- a/src/applications/config/controller/PhabricatorConfigEditController.php
+++ b/src/applications/config/controller/PhabricatorConfigEditController.php
@@ -120,10 +120,8 @@
->setSeverity(AphrontErrorView::SEVERITY_WARNING)
->appendChild(phutil_tag('p', array(), $msg));
} else if ($option->getLocked()) {
- $msg = pht(
- 'This configuration is locked and can not be edited from the web '.
- 'interface. Use `./bin/config` in `phabricator/` to edit it.');
+ $msg = $option->getLockedMessage();
$error_view = id(new AphrontErrorView())
->setTitle(pht('Configuration Locked'))
->setSeverity(AphrontErrorView::SEVERITY_NOTICE)
diff --git a/src/applications/config/option/PhabricatorConfigOption.php b/src/applications/config/option/PhabricatorConfigOption.php
--- a/src/applications/config/option/PhabricatorConfigOption.php
+++ b/src/applications/config/option/PhabricatorConfigOption.php
@@ -14,6 +14,7 @@
private $group;
private $examples;
private $locked;
+ private $lockedMessage;
private $hidden;
private $masked;
private $baseClass;
@@ -85,6 +86,20 @@
false);
}
+ public function setLockedMessage($message) {
+ $this->lockedMessage = $message;
+ return $this;
+ }
+
+ public function getLockedMessage() {
+ if ($this->lockedMessage !== null) {
+ return $this->lockedMessage;
+ }
+ return pht(
+ 'This configuration is locked and can not be edited from the web '.
+ 'interface. Use `./bin/config` in `phabricator/` to edit it.');
+ }
+
public function addExample($value, $description) {
$this->examples[] = array($value, $description);
return $this;
diff --git a/src/applications/config/option/PhabricatorCoreConfigOptions.php b/src/applications/config/option/PhabricatorCoreConfigOptions.php
--- a/src/applications/config/option/PhabricatorCoreConfigOptions.php
+++ b/src/applications/config/option/PhabricatorCoreConfigOptions.php
@@ -27,6 +27,7 @@
$proto_doc_href = PhabricatorEnv::getDoclink(
'User Guide: Prototype Applications');
$proto_doc_name = pht('User Guide: Prototype Applications');
+ $applications_app_href = '/applications/';
return array(
$this->newOption('phabricator.base-uri', 'string', null)
@@ -183,6 +184,14 @@
->setDescription(pht('Unit test value.')),
$this->newOption('phabricator.uninstalled-applications', 'set', array())
->setLocked(true)
+ ->setLockedMessage(pht(
+ 'Use the %s to manage installed applications.',
+ phutil_tag(
+ 'a',
+ array(
+ 'href' => $applications_app_href,
+ ),
+ pht('Applications application'))))
->setDescription(
pht('Array containing list of Uninstalled applications.')),
$this->newOption('phabricator.application-settings', 'wild', array())

File Metadata

Mime Type
text/plain
Expires
Mar 10 2025, 9:45 PM (6 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7475259
Default Alt Text
D10841.id26021.diff (3 KB)

Event Timeline