Aleksander Machniak
2012-10-20 0768134de16b1c75a1908da09f58cd627f2330b0
program/include/rcube_output_html.php
@@ -67,6 +67,11 @@
        $this->set_env('task', $task);
        $this->set_env('x_frame_options', $this->config->get('x_frame_options', 'sameorigin'));
        // add cookie info
        $this->set_env('cookie_domain', ini_get('session.cookie_domain'));
        $this->set_env('cookie_path', ini_get('session.cookie_path'));
        $this->set_env('cookie_secure', ini_get('session.cookie_secure'));
        // load the correct skin (in case user-defined)
        $skin = $this->config->get('skin');
        $this->set_skin($skin);
@@ -149,7 +154,7 @@
        else {
            $skin_path = $this->config->get('skin_path');
            if (!$skin_path) {
                $skin_path = 'skins/default';
                $skin_path = 'skins/' . rcube_config::DEFAULT_SKIN;
            }
            $valid = !$skin;
        }
@@ -395,7 +400,7 @@
                'line' => __LINE__,
                'file' => __FILE__,
                'message' => 'Error loading template for '.$realname
                ), true, true);
                ), true, $write);
            return false;
        }
@@ -522,7 +527,7 @@
    {
        $GLOBALS['__version']   = html::quote(RCMAIL_VERSION);
        $GLOBALS['__comm_path'] = html::quote($this->app->comm_path);
        $GLOBALS['__skin_path'] = Q($this->config->get('skin_path'));
        $GLOBALS['__skin_path'] = html::quote($this->config->get('skin_path'));
        return preg_replace_callback('/\$(__[a-z0-9_\-]+)/',
            array($this, 'globals_callback'), $input);
@@ -691,6 +696,11 @@
                if ($attrib['name'] || $attrib['command']) {
                    return $this->button($attrib);
                }
                break;
            // frame
            case 'frame':
                return $this->frame($attrib);
                break;
            // show a label
@@ -1270,6 +1280,30 @@
    }
    /**
     * Returns iframe object, registers some related env variables
     *
     * @param array $attrib HTML attributes
     *
     * @return string IFRAME element
     */
    public function frame($attrib)
    {
        if (!$attrib['id']) {
            $attrib['id'] = 'rcmframe';
        }
        if (!$attrib['name']) {
            $attrib['name'] = $attrib['id'];
        }
        $this->set_env('contentframe', $attrib['id']);
        $this->set_env('blankpage', $attrib['src'] ? $this->abs_url($attrib['src']) : 'program/resources/blank.gif');
        return html::iframe($attrib);
    }
    /*  ************* common functions delivering gui objects **************  */
@@ -1378,6 +1412,9 @@
        if (empty($url) && !preg_match('/_(task|action)=logout/', $_SERVER['QUERY_STRING']))
            $url = $_SERVER['QUERY_STRING'];
        // Disable autocapitalization on iPad/iPhone (#1488609)
        $attrib['autocapitalize'] = 'off';
        // set atocomplete attribute
        $user_attrib = $autocomplete > 0 ? array() : array('autocomplete' => 'off');
        $host_attrib = $autocomplete > 0 ? array() : array('autocomplete' => 'off');