Changeset fbe24e9 in github


Ignore:
Timestamp:
Nov 24, 2010 6:56:15 AM (3 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
e363b0d3
Parents:
576b330
Message:

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

Files:
3 edited

Legend:

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

    re3af1f2 rfbe24e9  
    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. 
  • program/include/rcube_template.php

    r7fcb56b rfbe24e9  
    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; 
  • skins/default/templates/login.html

    re947068 rfbe24e9  
    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.