diff options
Diffstat (limited to 'program/include')
-rw-r--r-- | program/include/iniset.php | 6 | ||||
-rw-r--r-- | program/include/rcmail.php | 23 | ||||
-rw-r--r-- | program/include/rcmail_install.php | 5 |
3 files changed, 28 insertions, 6 deletions
diff --git a/program/include/iniset.php b/program/include/iniset.php index 11a29034c..ca1e6ad75 100644 --- a/program/include/iniset.php +++ b/program/include/iniset.php @@ -5,7 +5,7 @@ | program/include/iniset.php | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2014, The Roundcube Dev Team | + | Copyright (C) 2008-2015, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -21,7 +21,7 @@ */ // application constants -define('RCMAIL_VERSION', '1.1-git'); +define('RCMAIL_VERSION', '1.2-git'); define('RCMAIL_START', microtime(true)); if (!defined('INSTALL_PATH')) { @@ -68,7 +68,7 @@ spl_autoload_register('rcmail_autoload'); // backward compatybility (to be removed) require_once INSTALL_PATH . 'program/include/bc.php'; -// load the UTF-8 portablity layer from Patchwor +// load the UTF-8 portablity layer from Patchwork if (!function_exists('iconv') || !function_exists('utf8_encode') || !extension_loaded('mbstring')) { \Patchwork\Utf8\Bootup::initAll(); } diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 306e5938a..6e74560cb 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -2286,6 +2286,29 @@ class rcmail extends rcube return $result; } + /** + * Get resource file content (with assets_dir support) + * + * @param string $name File name + */ + public function get_resource_content($name) + { + if (!strpos($name, '/')) { + $name = "program/resources/$name"; + } + + $assets_dir = $this->config->get('assets_dir'); + + if ($assets_dir) { + $path = slashify($assets_dir) . $name; + if (@file_exists($path)) { + $name = $path; + } + } + + return file_get_contents($name, false); + } + /************************************************************************ ********* Deprecated methods (to be removed) ********* diff --git a/program/include/rcmail_install.php b/program/include/rcmail_install.php index 2ba90693f..0d5fbc5da 100644 --- a/program/include/rcmail_install.php +++ b/program/include/rcmail_install.php @@ -234,10 +234,9 @@ class rcmail_install else if (is_numeric($value)) { $value = intval($value); } - else if ($prop == 'plugins') { + else if ($prop == 'plugins' && !empty($_POST['submit'])) { $value = array(); - foreach(array_keys($_POST) as $key) - { + foreach (array_keys($_POST) as $key) { if (preg_match('/^_plugins_*/', $key)) array_push($value, $_POST[$key]); } |