/** * Constructor * * @todo Replace $this->config with the real rcube_config object */ public function __construct($task = null, $framed = false) { parent::__construct(); $this->devel_mode = $this->config->get('devel_mode'); //$this->framed = $framed; $this->set_env('task', $task); $this->set_env('x_frame_options', $this->config->get('x_frame_options', 'sameorigin')); $this->set_env('standard_windows', (bool) $this->config->get('standard_windows')); // 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', filter_var(ini_get('session.cookie_secure'), FILTER_VALIDATE_BOOLEAN)); // load the correct skin (in case user-defined) $skin = $this->config->get('skin'); $this->set_skin($skin); $this->set_env('skin', $skin); if (!empty($_REQUEST['_extwin'])) { $this->set_env('extwin', 1); } if ($this->framed || !empty($_REQUEST['_framed'])) { $this->set_env('framed', 1); } // add common javascripts $this->add_script('var ' . self::JS_OBJECT_NAME . ' = new rcube_webmail();', 'head_top'); // don't wait for page onload. Call init at the bottom of the page (delayed) $this->add_script(self::JS_OBJECT_NAME . '.init();', 'docready'); $this->scripts_path = 'program/js/'; $this->include_script('jquery.min.js'); $this->include_script('common.js'); $this->include_script('app.js'); // register common UI objects $this->add_handlers(array('loginform' => array($this, 'login_form'), 'preloader' => array($this, 'preloader'), 'username' => array($this, 'current_username'), 'message' => array($this, 'message_container'), 'charsetselector' => array($this, 'charset_selector'), 'aboutcontent' => array($this, 'about_content'))); }
/** * Constructor */ public function __construct($task = null, $framed = false) { parent::__construct(); $this->devel_mode = $this->config->get('devel_mode'); $this->set_env('task', $task); $this->set_env('x_frame_options', $this->config->get('x_frame_options', 'sameorigin')); $this->set_env('standard_windows', (bool) $this->config->get('standard_windows')); $this->set_env('locale', $_SESSION['language']); $this->set_env('devel_mode', $this->devel_mode); // 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', filter_var(ini_get('session.cookie_secure'), FILTER_VALIDATE_BOOLEAN)); // load the correct skin (in case user-defined) $skin = $this->config->get('skin'); $this->set_skin($skin); $this->set_env('skin', $skin); $this->set_assets_path($this->config->get('assets_path'), $this->config->get('assets_dir')); if (!empty($_REQUEST['_extwin'])) { $this->set_env('extwin', 1); } if ($this->framed || $framed) { $this->set_env('framed', 1); } $lic = <<<EOF /* @licstart The following is the entire license notice for the JavaScript code in this page. Copyright (C) 2005-2014 The Roundcube Dev Team The JavaScript code in this page is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. The code is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. @licend The above is the entire license notice for the JavaScript code in this page. */ EOF; // add common javascripts $this->add_script($lic, 'head_top'); $this->add_script('var ' . self::JS_OBJECT_NAME . ' = new rcube_webmail();', 'head_top'); // don't wait for page onload. Call init at the bottom of the page (delayed) $this->add_script(self::JS_OBJECT_NAME . '.init();', 'docready'); $this->scripts_path = 'program/js/'; $this->include_script('jquery.min.js'); $this->include_script('common.js'); $this->include_script('app.js'); // register common UI objects $this->add_handlers(array('loginform' => array($this, 'login_form'), 'preloader' => array($this, 'preloader'), 'username' => array($this, 'current_username'), 'message' => array($this, 'message_container'), 'charsetselector' => array($this, 'charset_selector'), 'aboutcontent' => array($this, 'about_content'))); }
/** * Object constructor */ public function __construct($task = null, $framed = false) { parent::__construct(); }