Default to "True" and "False" for bool options.

Summary:
Rather than throwing if we don't `setOptions()`, let's just default to `true`
and `false`.

Test Plan:
Removed a `setOptions()` call temporarily and saw options default to
`true` / `false`.

Reviewers: epriestley, btrahan, chad

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2255

Differential Revision: https://secure.phabricator.com/D4368
This commit is contained in:
Ricky Elrod
2013-01-09 08:14:26 -08:00
committed by epriestley
parent f12dbe36d6
commit 71b5d8f584
15 changed files with 48 additions and 42 deletions

View File

@@ -350,8 +350,8 @@ final class PhabricatorConfigEditController
->setOptions(
array(
'' => pht('(Use Default)'),
'true' => idx($option->getOptions(), 0),
'false' => idx($option->getOptions(), 1),
'true' => idx($option->getBoolOptions(), 0),
'false' => idx($option->getBoolOptions(), 1),
));
break;
case 'class':