Thomas Bruederli
2012-12-16 939f94bb732300e167ddc51f266743b88ae0867f
Merge branch 'master' of github.com:roundcube/roundcubemail
1 files added
2 files modified
20 ■■■■■ changed files
plugins/http_authentication/config.inc.php.dist 9 ●●●●● patch | view | raw | blame | history
plugins/http_authentication/http_authentication.php 9 ●●●●● patch | view | raw | blame | history
program/steps/mail/func.inc 2 ●●● patch | view | raw | blame | history
plugins/http_authentication/config.inc.php.dist
New file
@@ -0,0 +1,9 @@
<?php
// HTTP Basic Authentication Plugin options
// ----------------------------------------
// Default mail host to log-in using user/password from HTTP Authentication.
// This is useful if the users are free to choose arbitrary mail hosts (or
// from a list), but have one host they usually want to log into.
// Unlike $rcmail_config['default_host'] this must be a string!
$rcmail_config['http_authentication_host'] = '';
plugins/http_authentication/http_authentication.php
@@ -11,6 +11,8 @@
 *
 * See logout.html (in this directory) for an example how HTTP auth can be cleared.
 *
 * For other configuration options, see config.inc.php.dist!
 *
 * @version @package_version@
 * @license GNU GPLv3+
 * @author Thomas Bruederli
@@ -46,6 +48,13 @@
    function authenticate($args)
    {
        // Load plugin's config file
        $this->load_config();
        $host = rcmail::get_instance()->config->get('http_authentication_host');
        if (is_string($host) && trim($host) !== '')
            $args['host'] = rcube_idn_to_ascii(rcube_parse_host($host));
        // Allow entering other user data in login form,
        // e.g. after log out (#1487953)
        if (!empty($args['user'])) {
program/steps/mail/func.inc
@@ -1528,7 +1528,7 @@
      if ($addicon && $_SESSION['writeable_abook']) {
        $address .= html::a(array(
            'href' => "#add",
            'onclick' => sprintf("return %s.command('add-contact','%s',this)", JS_OBJECT_NAME, $string),
            'onclick' => sprintf("return %s.command('add-contact','%s',this)", JS_OBJECT_NAME, JQ($string)),
            'title' => rcube_label('addtoaddressbook'),
            'class' => 'rcmaddcontact',
          ),