Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15342986
D10841.id26021.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D10841.id26021.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D10841: Config - improve lock message for option `phabricator.uninstalled-applications`
Attached
Detach File
Event Timeline
Log In to Comment