From 60226a75d8e4a3ee9504da6eab6d8f329bb32e7b Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Tue, 27 Nov 2012 06:13:33 -0500 Subject: [PATCH] Separate the very application-specific output classes from the Roundcube framework; add autoloader for rmail* classes --- program/include/rcmail.php | 20 +++++++++----------- 1 files changed, 9 insertions(+), 11 deletions(-) diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 3a8c62c..8e01a21 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -56,8 +56,6 @@ private $action_map = array(); - const JS_OBJECT_NAME = 'rcmail'; - const ERROR_STORAGE = -2; const ERROR_INVALID_REQUEST = 1; const ERROR_INVALID_HOST = 2; @@ -321,17 +319,17 @@ /** * Init output object for GUI and add common scripts. - * This will instantiate a rcube_output_html object and set + * This will instantiate a rcmail_output_html object and set * environment vars according to the current session and configuration * * @param boolean True if this request is loaded in a (i)frame - * @return rcube_output_html Reference to HTML output object + * @return rcube_output Reference to HTML output object */ public function load_gui($framed = false) { // init output page - if (!($this->output instanceof rcube_output_html)) - $this->output = new rcube_output_html($this->task, $framed); + if (!($this->output instanceof rcmail_output_html)) + $this->output = new rcmail_output_html($this->task, $framed); // set refresh interval $this->output->set_env('refresh_interval', $this->config->get('refresh_interval', 0)); @@ -357,12 +355,12 @@ /** * Create an output object for JSON responses * - * @return rcube_output_json Reference to JSON output object + * @return rcube_output Reference to JSON output object */ public function json_init() { - if (!($this->output instanceof rcube_output_json)) - $this->output = new rcube_output_json($this->task); + if (!($this->output instanceof rcmail_output_json)) + $this->output = new rcmail_output_json($this->task); return $this->output; } @@ -1566,7 +1564,7 @@ $html_name = $this->Q($foldername) . ($unread ? html::span('unreadcount', sprintf($attrib['unreadwrap'], $unread)) : ''); $link_attrib = $folder['virtual'] ? array() : array( 'href' => $this->url(array('_mbox' => $folder['id'])), - 'onclick' => sprintf("return %s.command('list','%s',this)", rcmail::JS_OBJECT_NAME, $js_name), + 'onclick' => sprintf("return %s.command('list','%s',this)", rcmail_output::JS_OBJECT_NAME, $js_name), 'rel' => $folder['id'], 'title' => $title, ); @@ -1579,7 +1577,7 @@ (!empty($folder['folders']) ? html::div(array( 'class' => ($is_collapsed ? 'collapsed' : 'expanded'), 'style' => "position:absolute", - 'onclick' => sprintf("%s.command('collapse-folder', '%s')", rcmail::JS_OBJECT_NAME, $js_name) + 'onclick' => sprintf("%s.command('collapse-folder', '%s')", rcmail_output::JS_OBJECT_NAME, $js_name) ), ' ') : '')); $jslist[$folder_id] = array( -- Gitblit v1.9.1