Changeset 4257 in subversion


Ignore:
Timestamp:
Nov 24, 2010 6:56:15 AM (2 years ago)
Author:
thomasb
Message:

Allow plugin templates to include local files (#1487133); make autocomplete on login screen configurable

Location:
trunk/roundcubemail
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/config/main.inc.php.dist

    r4211 r4257  
    180180// set the port for the ssl connection as value of this option if it differs from the default 443 
    181181$rcmail_config['force_https'] = false; 
     182 
     183// Allow browser-autocompletion on login form 
     184$rcmail_config['login_autocomplete'] = false; 
    182185 
    183186// automatically create a new Roundcube user when log-in the first time. 
  • trunk/roundcubemail/program/include/rcube_template.php

    r4192 r4257  
    3838    private $js_commands = array(); 
    3939    private $object_handlers = array(); 
     40    private $plugin_skin_path; 
    4041 
    4142    public $browser; 
     
    374375        $skin_path = $this->config['skin_path']; 
    375376        $plugin = false; 
     377        $this->plugin_skin_path = null; 
    376378 
    377379        $temp = explode(".", $name, 2); 
     
    380382            $name = $temp[1]; 
    381383            $skin_dir = $plugin . '/skins/' . $this->config['skin']; 
    382             $skin_path = $this->app->plugins->dir . $skin_dir; 
     384            $skin_path = $this->plugin_skin_path = $this->app->plugins->dir . $skin_dir; 
    383385            if (!is_dir($skin_path)) {  // fallback to default skin 
    384386                $skin_dir = $plugin . '/skins/default'; 
    385                 $skin_path = $this->app->plugins->dir . $skin_dir; 
     387                $skin_path = $this->plugin_skin_path = $this->app->plugins->dir . $skin_dir; 
    386388            } 
    387389        } 
     
    665667            // include a file 
    666668            case 'include': 
    667                 $path = realpath($this->config['skin_path'].$attrib['file']); 
     669                if (!$this->plugin_skin_path || !is_file($path = realpath($this->plugin_skin_path . $attrib['file']))) 
     670                    $path = realpath(($attrib['skin_path'] ? $attrib['skin_path'] : $this->config['skin_path']).$attrib['file']); 
     671                 
    668672                if (is_readable($path)) { 
    669673                    if ($this->config['skin_include_php']) { 
     
    10421046    { 
    10431047        $default_host = $this->config['default_host']; 
     1048        $attrib['autocomplete'] = $this->config['login_autocomplete'] ? null : 'off'; 
    10441049 
    10451050        $_SESSION['temp'] = true; 
  • trunk/roundcubemail/skins/default/templates/login.html

    r4060 r4257  
    1717 
    1818<form name="form" action="./" method="post"> 
    19 <roundcube:object name="loginform" form="form" autocomplete="off" /> 
     19<roundcube:object name="loginform" form="form" /> 
    2020 
    2121<p style="text-align:center;"><input type="submit" class="button mainaction" value="<roundcube:label name='login' />" /></p> 
Note: See TracChangeset for help on using the changeset viewer.