summaryrefslogtreecommitdiff
path: root/program/include/rcube_template.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-09-15 14:53:57 +0000
committerthomascube <thomas@roundcube.net>2008-09-15 14:53:57 +0000
commitf645ce169e11339d45cbc0b5b4cf6154346fd4c7 (patch)
tree119de2f39e224d28c5fc8be0967bfb43e4320a27 /program/include/rcube_template.php
parent3e1e7750834edfe0062c83d66690f4fe4521b8ba (diff)
Redesign of the identities settings + add config option to disable multiple identities
Diffstat (limited to 'program/include/rcube_template.php')
-rwxr-xr-xprogram/include/rcube_template.php50
1 files changed, 29 insertions, 21 deletions
diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php
index 4441b0a41..98e29e74e 100755
--- a/program/include/rcube_template.php
+++ b/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;