From 83a7636872d58f044d1fac444268dd2e7c7ebaee Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Sat, 14 Jun 2008 08:23:08 -0400 Subject: [PATCH] More code cleanup --- program/include/rcube_template.php | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php index d519f75..5834e42 100755 --- a/program/include/rcube_template.php +++ b/program/include/rcube_template.php @@ -32,7 +32,6 @@ { var $app; var $config; - var $task = ''; var $framed = false; var $pagetitle = ''; var $env = array(); @@ -56,7 +55,7 @@ $this->config = $this->app->config->all(); //$this->framed = $framed; - $this->task = $task; + $this->set_env('task', $task); // add common javascripts $javascript = 'var '.JS_OBJECT_NAME.' = new rcube_webmail();'; @@ -534,10 +533,15 @@ return Q($name); } if ($object=='version') { - return (string)RCMAIL_VERSION; + $ver = (string)RCMAIL_VERSION; + if (is_file(INSTALL_PATH . '.svn/entries')) { + if (preg_match('/Revision:\s(\d+)/', @shell_exec('svn info'), $regs)) + $ver .= ' [SVN r'.$regs[1].']'; + } + return $ver; } if ($object=='pagetitle') { - $task = $this->task; + $task = $this->env['task']; $title = !empty($this->config['product_name']) ? $this->config['product_name'].' :: ' : ''; if (!empty($this->pagetitle)) { @@ -755,7 +759,7 @@ array( 'style', 'class', 'id', 'width', 'height', 'border', 'hspace', - 'vspace', 'align', 'alt', + 'vspace', 'align', 'alt', 'tabindex' ) ); $btn_content = sprintf('<img src="%s"%s />', $this->abs_url($attrib['image']), $attrib_str); @@ -766,7 +770,7 @@ } else if ($attrib['type']=='link') { $btn_content = $attrib['label'] ? $attrib['label'] : $attrib['command']; - $link_attrib = array('href', 'onclick', 'title', 'id', 'class', 'style'); + $link_attrib = array('href', 'onclick', 'title', 'id', 'class', 'style', 'tabindex'); } else if ($attrib['type']=='input') { $attrib['type'] = 'button'; @@ -779,7 +783,7 @@ $attrib, array( 'type', 'value', 'onclick', - 'id', 'class', 'style' + 'id', 'class', 'style', 'tabindex' ) ); $out = sprintf('<input%s disabled="disabled" />', $attrib_str); -- Gitblit v1.9.1