Differential D9431 Diff 22523 src/applications/config/controller/PhabricatorConfigEditController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/controller/PhabricatorConfigEditController.php
| Show All 18 Lines | if (empty($options[$this->key])) { | ||||
| $ancient = PhabricatorSetupCheckExtraConfig::getAncientConfig(); | $ancient = PhabricatorSetupCheckExtraConfig::getAncientConfig(); | ||||
| if (isset($ancient[$this->key])) { | if (isset($ancient[$this->key])) { | ||||
| $desc = pht( | $desc = pht( | ||||
| "This configuration has been removed. You can safely delete ". | "This configuration has been removed. You can safely delete ". | ||||
| "it.\n\n%s", | "it.\n\n%s", | ||||
| $ancient[$this->key]); | $ancient[$this->key]); | ||||
| } else { | } else { | ||||
| $desc = pht( | $desc = pht( | ||||
| "This configuration option is unknown. It may be misspelled, ". | 'This configuration option is unknown. It may be misspelled, '. | ||||
| "or have existed in a previous version of Phabricator."); | 'or have existed in a previous version of Phabricator.'); | ||||
| } | } | ||||
| // This may be a dead config entry, which existed in the past but no | // This may be a dead config entry, which existed in the past but no | ||||
| // longer exists. Allow it to be edited so it can be reviewed and | // longer exists. Allow it to be edited so it can be reviewed and | ||||
| // deleted. | // deleted. | ||||
| $option = id(new PhabricatorConfigOption()) | $option = id(new PhabricatorConfigOption()) | ||||
| ->setKey($this->key) | ->setKey($this->key) | ||||
| ->setType('wild') | ->setType('wild') | ||||
| ▲ Show 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | public function processRequest() { | ||||
| $form = new AphrontFormView(); | $form = new AphrontFormView(); | ||||
| $error_view = null; | $error_view = null; | ||||
| if ($errors) { | if ($errors) { | ||||
| $error_view = id(new AphrontErrorView()) | $error_view = id(new AphrontErrorView()) | ||||
| ->setErrors($errors); | ->setErrors($errors); | ||||
| } else if ($option->getHidden()) { | } else if ($option->getHidden()) { | ||||
| $msg = pht( | $msg = pht( | ||||
| "This configuration is hidden and can not be edited or viewed from ". | 'This configuration is hidden and can not be edited or viewed from '. | ||||
| "the web interface."); | 'the web interface.'); | ||||
| $error_view = id(new AphrontErrorView()) | $error_view = id(new AphrontErrorView()) | ||||
| ->setTitle(pht('Configuration Hidden')) | ->setTitle(pht('Configuration Hidden')) | ||||
| ->setSeverity(AphrontErrorView::SEVERITY_WARNING) | ->setSeverity(AphrontErrorView::SEVERITY_WARNING) | ||||
| ->appendChild(phutil_tag('p', array(), $msg)); | ->appendChild(phutil_tag('p', array(), $msg)); | ||||
| } else if ($option->getLocked()) { | } else if ($option->getLocked()) { | ||||
| $msg = pht( | $msg = pht( | ||||
| "This configuration is locked and can not be edited from the web ". | 'This configuration is locked and can not be edited from the web '. | ||||
| "interface. Use `./bin/config` in `phabricator/` to edit it."); | 'interface. Use `./bin/config` in `phabricator/` to edit it.'); | ||||
| $error_view = id(new AphrontErrorView()) | $error_view = id(new AphrontErrorView()) | ||||
| ->setTitle(pht('Configuration Locked')) | ->setTitle(pht('Configuration Locked')) | ||||
| ->setSeverity(AphrontErrorView::SEVERITY_NOTICE) | ->setSeverity(AphrontErrorView::SEVERITY_NOTICE) | ||||
| ->appendChild(phutil_tag('p', array(), $msg)); | ->appendChild(phutil_tag('p', array(), $msg)); | ||||
| } | } | ||||
| if ($option->getHidden()) { | if ($option->getHidden()) { | ||||
| ▲ Show 20 Lines • Show All 416 Lines • Show Last 20 Lines | |||||