alecpl
2008-05-29 75da0b6f74203c6ea2656a1bbcf6bacba17a15c6
program/include/rcube_json_output.php
@@ -41,10 +41,10 @@
    /**
     * Constructor
     */
    public function __construct(&$config, $task)
    public function __construct($task)
    {
        $this->task   = $task;
        $this->config = $config;
        $this->config = rcmail::get_instance()->config;
    }
    
    
@@ -64,7 +64,8 @@
     */
    public function set_pagetitle($title)
    {
        // ignore
   $name = $this->config->get('product_name');
   $this->command('set_pagetitle', JQ(empty($name) ? $title : $name.' :: '.$title));
    }
    /**
@@ -211,7 +212,10 @@
     */
    private function get_js_commands()
    {
        $out = 'this.set_env('.json_serialize($this->env).");\n";
        $out = '';
   if (sizeof($this->env))
       $out .= 'this.set_env('.json_serialize($this->env).");\n";
        
        foreach($this->texts as $name => $text) {
            $out .= sprintf("this.add_label('%s', '%s');\n", $name, JQ($text));
@@ -229,7 +233,7 @@
                implode(',', $args)
            );
        }
        return $out;
    }
}