thomascube
2009-07-24 29f977858ebabb8243e1ef5d2c869279ac1e170e
program/include/rcube_template.php
@@ -289,7 +289,7 @@
    {
        if ($templ != 'iframe') {
            // prevent from endless loops
            if ($this->app->plugins->is_processing('render_page')) {
            if ($exit != 'recur' && $this->app->plugins->is_processing('render_page')) {
                raise_error(array('code' => 505, 'type' => 'php', 'message' => 'Recursion alert: ignoring output->send()'), true, false);
                return;
            }
@@ -329,6 +329,7 @@
        
        // make sure all <form> tags have a valid request token
        $template = preg_replace_callback('/<form\s+([^>]+)>/Ui', array($this, 'alter_form_tag'), $template);
        $this->footer = preg_replace_callback('/<form\s+([^>]+)>/Ui', array($this, 'alter_form_tag'), $this->footer);
        // call super method
        parent::write($template, $this->config['skin_path']);
@@ -839,9 +840,9 @@
            else if (in_array($attrib['command'], $a_static_commands)) {
                $attrib['href'] = rcmail_url($attrib['command']);
            }
       else if ($attrib['command'] == 'permaurl' && !empty($this->env['permaurl'])) {
           $attrib['href'] = $this->env['permaurl'];
       }
            else if ($attrib['command'] == 'permaurl' && !empty($this->env['permaurl'])) {
              $attrib['href'] = $this->env['permaurl'];
            }
        }
        // overwrite attributes
@@ -854,35 +855,6 @@
                JS_OBJECT_NAME,
                $command,
                $attrib['prop']
            );
        }
        if ($command && $attrib['imageover']) {
            $attrib['onmouseover'] = sprintf(
                "return %s.button_over('%s','%s')",
                JS_OBJECT_NAME,
                $command,
                $attrib['id']
            );
            $attrib['onmouseout'] = sprintf(
                "return %s.button_out('%s','%s')",
                JS_OBJECT_NAME,
                $command,
                $attrib['id']
            );
        }
        if ($command && $attrib['imagesel']) {
            $attrib['onmousedown'] = sprintf(
                "return %s.button_sel('%s','%s')",
                JS_OBJECT_NAME,
                $command,
                $attrib['id']
            );
            $attrib['onmouseup'] = sprintf(
                "return %s.button_out('%s','%s')",
                JS_OBJECT_NAME,
                $command,
                $attrib['id']
            );
        }