summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcube_template.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-09-15 14:53:57 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-09-15 14:53:57 +0000
commit2e1dbee93cc7c27137e9c40b3ea68dd7525530c8 (patch)
tree6e03e10694695d40d7e03e688f81b7032770ad41 /roundcubemail/program/include/rcube_template.php
parent62d14492c7099297c8d64548cb581af463311953 (diff)
Redesign of the identities settings + add config option to disable multiple identities
git-svn-id: https://svn.roundcube.net/trunk@1796 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_template.php')
-rwxr-xr-xroundcubemail/program/include/rcube_template.php50
1 files changed, 29 insertions, 21 deletions
diff --git a/roundcubemail/program/include/rcube_template.php b/roundcubemail/program/include/rcube_template.php
index 4441b0a41..98e29e74e 100755
--- a/roundcubemail/program/include/rcube_template.php
+++ b/roundcubemail/program/include/rcube_template.php
@@ -106,6 +106,28 @@ class rcube_template extends rcube_html_page
$this->pagetitle = $title;
}
+
+ /**
+ * Getter for the current page title
+ *
+ * @return string The page title
+ */
+ public function get_pagetitle()
+ {
+ if (!empty($this->pagetitle)) {
+ $title = $this->pagetitle;
+ }
+ else if ($this->env['task'] == 'login') {
+ $title = rcube_label(array('name' => 'welcome', 'vars' => array('product' => $this->config['product_name'])));
+ }
+ else {
+ $title = ucfirst($this->env['task']);
+ }
+
+ return $title;
+ }
+
+
/**
* Set skin
*/
@@ -357,13 +379,7 @@ class rcube_template extends rcube_html_page
implode(',', $args)
);
}
- // add command to set page title
- if ($this->ajax_call && !empty($this->pagetitle)) {
- $out .= sprintf(
- "this.set_pagetitle('%s');\n",
- JQ((!empty($this->config['product_name']) ? $this->config['product_name'].' :: ' : '') . $this->pagetitle)
- );
- }
+
return $out;
}
@@ -455,13 +471,13 @@ class rcube_template extends rcube_html_page
$condition = preg_replace(
array(
'/session:([a-z0-9_]+)/i',
- '/config:([a-z0-9_]+)/i',
+ '/config:([a-z0-9_]+)(:([a-z0-9_]+))?/i',
'/env:([a-z0-9_]+)/i',
'/request:([a-z0-9_]+)/ie'
),
array(
"\$_SESSION['\\1']",
- "\$this->config['\\1']",
+ "\$this->app->config->get('\\1',get_boolean('\\3'))",
"\$this->env['\\1']",
"get_input_value('\\1', RCUVE_INPUT_GPC)"
),
@@ -591,20 +607,12 @@ class rcube_template extends rcube_html_page
}
return $ver;
}
+ if ($object=='steptitle') {
+ return Q($this->get_pagetitle());
+ }
if ($object=='pagetitle') {
- $task = $this->env['task'];
$title = !empty($this->config['product_name']) ? $this->config['product_name'].' :: ' : '';
-
- if (!empty($this->pagetitle)) {
- $title .= $this->pagetitle;
- }
- else if ($task == 'login') {
- $title = rcube_label(array('name' => 'welcome', 'vars' => array('product' => $this->config['product_name'])));
- }
- else {
- $title .= ucfirst($task);
- }
-
+ $title .= $this->get_pagetitle();
return Q($title);
}
break;