Changeset View
Changeset View
Standalone View
Standalone View
resources/sql/patches/20130619.authconf.php
| Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | |||||
| foreach ($config_map as $provider_class => $spec) { | foreach ($config_map as $provider_class => $spec) { | ||||
| $enabled_key = idx($spec, 'enabled'); | $enabled_key = idx($spec, 'enabled'); | ||||
| $enabled_default = idx($spec, 'enabled-default', false); | $enabled_default = idx($spec, 'enabled-default', false); | ||||
| $enabled = PhabricatorEnv::getEnvConfigIfExists( | $enabled = PhabricatorEnv::getEnvConfigIfExists( | ||||
| $enabled_key, | $enabled_key, | ||||
| $enabled_default); | $enabled_default); | ||||
| if (!$enabled) { | if (!$enabled) { | ||||
| echo pht("Skipping %s (not enabled).\n", $provider_class); | echo pht('Skipping %s (not enabled).', $provider_class)."\n"; | ||||
| // This provider was not previously enabled, so we can skip migrating it. | // This provider was not previously enabled, so we can skip migrating it. | ||||
| continue; | continue; | ||||
| } else { | } else { | ||||
| echo pht("Migrating %s...\n", $provider_class); | echo pht('Migrating %s...', $provider_class)."\n"; | ||||
| } | } | ||||
| $registration_key = idx($spec, 'registration'); | $registration_key = idx($spec, 'registration'); | ||||
| if ($registration_key === true) { | if ($registration_key === true) { | ||||
| $registration = 1; | $registration = 1; | ||||
| } else if ($registration_key === false) { | } else if ($registration_key === false) { | ||||
| $registration = 0; | $registration = 0; | ||||
| } else { | } else { | ||||
| ▲ Show 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | case 'PhabricatorLDAPAuthProvider': | ||||
| PhabricatorEnv::getEnvConfigIfExists($ckey, $default)); | PhabricatorEnv::getEnvConfigIfExists($ckey, $default)); | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| $config->save(); | $config->save(); | ||||
| } | } | ||||
| echo "Done.\n"; | echo pht('Done.')."\n"; | ||||