diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-24 11:56:15 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-24 11:56:15 +0000 |
| commit | 1f1597a6baec4f3f0050d19a1f3207a754b95bcd (patch) | |
| tree | 414fb12c766a20a5010cc157ce54808490709a4e | |
| parent | 3ac8a69a485ef63ed7946399153d6209f0468ead (diff) | |
Allow plugin templates to include local files (#1487133); make autocomplete on login screen configurable
git-svn-id: https://svn.roundcube.net/trunk@4257 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/config/main.inc.php.dist | 3 | ||||
| -rwxr-xr-x | roundcubemail/program/include/rcube_template.php | 11 | ||||
| -rw-r--r-- | roundcubemail/skins/default/templates/login.html | 2 |
3 files changed, 12 insertions, 4 deletions
diff --git a/roundcubemail/config/main.inc.php.dist b/roundcubemail/config/main.inc.php.dist index aba41661b..2b18da333 100644 --- a/roundcubemail/config/main.inc.php.dist +++ b/roundcubemail/config/main.inc.php.dist @@ -180,6 +180,9 @@ $rcmail_config['message_cache_lifetime'] = '10d'; // set the port for the ssl connection as value of this option if it differs from the default 443 $rcmail_config['force_https'] = false; +// Allow browser-autocompletion on login form +$rcmail_config['login_autocomplete'] = false; + // automatically create a new Roundcube user when log-in the first time. // a new user will be created once the IMAP login succeeds. // set to false if only registered users can use this service diff --git a/roundcubemail/program/include/rcube_template.php b/roundcubemail/program/include/rcube_template.php index c8e813835..8a9eff4f5 100755 --- a/roundcubemail/program/include/rcube_template.php +++ b/roundcubemail/program/include/rcube_template.php @@ -37,6 +37,7 @@ class rcube_template extends rcube_html_page private $js_env = array(); private $js_commands = array(); private $object_handlers = array(); + private $plugin_skin_path; public $browser; public $framed = false; @@ -373,16 +374,17 @@ class rcube_template extends rcube_html_page { $skin_path = $this->config['skin_path']; $plugin = false; + $this->plugin_skin_path = null; $temp = explode(".", $name, 2); if (count($temp) > 1) { $plugin = $temp[0]; $name = $temp[1]; $skin_dir = $plugin . '/skins/' . $this->config['skin']; - $skin_path = $this->app->plugins->dir . $skin_dir; + $skin_path = $this->plugin_skin_path = $this->app->plugins->dir . $skin_dir; if (!is_dir($skin_path)) { // fallback to default skin $skin_dir = $plugin . '/skins/default'; - $skin_path = $this->app->plugins->dir . $skin_dir; + $skin_path = $this->plugin_skin_path = $this->app->plugins->dir . $skin_dir; } } @@ -664,7 +666,9 @@ class rcube_template extends rcube_html_page // include a file case 'include': - $path = realpath($this->config['skin_path'].$attrib['file']); + if (!$this->plugin_skin_path || !is_file($path = realpath($this->plugin_skin_path . $attrib['file']))) + $path = realpath(($attrib['skin_path'] ? $attrib['skin_path'] : $this->config['skin_path']).$attrib['file']); + if (is_readable($path)) { if ($this->config['skin_include_php']) { $incl = $this->include_php($path); @@ -1041,6 +1045,7 @@ class rcube_template extends rcube_html_page private function login_form($attrib) { $default_host = $this->config['default_host']; + $attrib['autocomplete'] = $this->config['login_autocomplete'] ? null : 'off'; $_SESSION['temp'] = true; diff --git a/roundcubemail/skins/default/templates/login.html b/roundcubemail/skins/default/templates/login.html index d36fd7452..a315557bf 100644 --- a/roundcubemail/skins/default/templates/login.html +++ b/roundcubemail/skins/default/templates/login.html @@ -16,7 +16,7 @@ <div class="boxcontent"> <form name="form" action="./" method="post"> -<roundcube:object name="loginform" form="form" autocomplete="off" /> +<roundcube:object name="loginform" form="form" /> <p style="text-align:center;"><input type="submit" class="button mainaction" value="<roundcube:label name='login' />" /></p> |
