Diffusion / MetaMTA options

Summary: Implement Diffusion MetaMTA options. Also make the fake '{{config.option}}' rule work, and use Remarkup to render summaries as well as descriptions.

Test Plan: Looked at Diffusion rules, edited some, looked at setup issues, verified '{{config.option}}' linked to the right option.

Reviewers: codeblock, btrahan

Reviewed By: codeblock

CC: aran

Maniphest Tasks: T2255

Differential Revision: https://secure.phabricator.com/D4466
This commit is contained in:
epriestley
2013-01-16 09:08:13 -08:00
parent 4a21ed5561
commit b04a6a1999
4 changed files with 90 additions and 2 deletions

View File

@@ -64,13 +64,21 @@ final class PhabricatorConfigGroupController
$db_values = mpull($db_values, null, 'getConfigKey');
}
$engine = id(new PhabricatorMarkupEngine())
->setViewer($this->getRequest()->getUser());
foreach ($options as $option) {
$engine->addObject($option, 'summary');
}
$engine->process();
$list = new PhabricatorObjectItemListView();
foreach ($options as $option) {
$summary = $engine->getOutput($option, 'summary');
$item = id(new PhabricatorObjectItemView())
->setHeader($option->getKey())
->setHref('/config/edit/'.$option->getKey().'/')
->addAttribute(phutil_escape_html($option->getSummary()));
->addAttribute($summary);
if (!$option->getHidden() && !$option->getMasked()) {
$current_value = PhabricatorEnv::getEnvConfig($option->getKey());