alecpl
2011-08-03 159763861e15fce2006b1830ebdb646c5ad52d0c
- Display current user name in page title if devel_mode=true


2 files modified
13 ■■■■ changed files
program/include/rcube_json_output.php 6 ●●●● patch | view | raw | blame | history
program/include/rcube_template.php 7 ●●●● patch | view | raw | blame | history
program/include/rcube_json_output.php
@@ -75,7 +75,11 @@
     */
    public function set_pagetitle($title)
    {
        $name = $this->config->get('product_name');
        if ($this->config->get('devel_mode') && !empty($_SESSION['username']))
            $name = $_SESSION['username'];
        else
            $name = $this->config->get('product_name');
        $this->command('set_pagetitle', empty($name) ? $title : $name.' :: '.$title);
    }
program/include/rcube_template.php
@@ -748,7 +748,12 @@
                  $content = Q($this->get_pagetitle());
                }
                else if ($object == 'pagetitle') {
                    $title = !empty($this->config['product_name']) ? $this->config['product_name'].' :: ' : '';
                    if (!empty($this->config['devel_mode']) && !empty($_SESSION['username']))
                      $title = $_SESSION['username'].' :: ';
                    else if (!empty($this->config['product_name']))
                      $title = $this->config['product_name'].' :: ';
                    else
                      $title = '';
                    $title .= $this->get_pagetitle();
                    $content = Q($title);
                }