fix typo in smtp plugin name and stay on selected accounts plugin, even if it is inaccessible due to open_basedir, as we otherwise would store default "sql"

This commit is contained in:
Ralf Becker 2014-11-06 19:21:56 +00:00
parent afaf5a1ece
commit 8a32ae7c32
3 changed files with 5 additions and 4 deletions

View File

@ -778,7 +778,7 @@ function set_univention_defaults()
if (!is_array($domains)) $domains = explode("\n", $domains); if (!is_array($domains)) $domains = explode("\n", $domains);
$domain = array_shift($domains); $domain = array_shift($domains);
$config['smtpserver'] = "$mailserver,465,,,yes,tls"; $config['smtpserver'] = "$mailserver,465,,,yes,tls";
$config['smtp'] = ',emailadmin_smtp_ldap_univention'; $config['smtp'] = ',emailadmin_smtp_univention';
$config['mailserver'] = "$mailserver,993,$domain,email,tls"; $config['mailserver'] = "$mailserver,993,$domain,email,tls";
$config['imap'] = /*'cyrus,'._ucr_secret('cyrus')*/','.',emailadmin_imap_cyrus'; $config['imap'] = /*'cyrus,'._ucr_secret('cyrus')*/','.',emailadmin_imap_cyrus';
$config['folder'] = 'INBOX/Sent,INBOX/Trash,INBOX/Drafts,INBOX/Templates,INBOX/Spam'; $config['folder'] = 'INBOX/Sent,INBOX/Trash,INBOX/Drafts,INBOX/Templates,INBOX/Spam';

View File

@ -473,9 +473,10 @@ class setup_cmd_config extends setup_cmd
/** /**
* Read auth-types (existing auth backends) from filesystem and fix our $options array * Read auth-types (existing auth backends) from filesystem and fix our $options array
* *
* @param string $current =null current value, to allways return it
* @return array * @return array
*/ */
static function account_repositories() static function account_repositories($current=null)
{ {
static $account_repositories = array( static $account_repositories = array(
'sql' => 'SQL', 'sql' => 'SQL',
@ -492,7 +493,7 @@ class setup_cmd_config extends setup_cmd
if (preg_match('/^class\.accounts_([a-z]+)\.inc\.php$/', $file, $matches) && if (preg_match('/^class\.accounts_([a-z]+)\.inc\.php$/', $file, $matches) &&
!isset($account_repositories[$matches[1]]) && !isset($account_repositories[$matches[1]]) &&
class_exists($class='accounts_'.$matches[1]) && class_exists($class='accounts_'.$matches[1]) &&
(!is_callable($callable=$class.'::available') || call_user_func($callable))) ($matches[1] == $current || !is_callable($callable=$class.'::available') || call_user_func($callable)))
{ {
$account_repositories[$matches[1]] = ucfirst($matches[1]); $account_repositories[$matches[1]] = ucfirst($matches[1]);
} }

View File

@ -193,7 +193,7 @@ function auth_type_activesync($config)
*/ */
function account_repository($config) function account_repository($config)
{ {
return _options_from(setup_cmd_config::account_repositories(), $config['account_repository']); return _options_from(setup_cmd_config::account_repositories($config['account_repository']), $config['account_repository']);
} }
/** /**