From eef9eb1146cf9903e58743291ca27c68340aea2c Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Wed, 21 Aug 2013 03:44:27 -0400
Subject: [PATCH] Synchronized localization files from Transifex

---
 program/lib/Roundcube/bootstrap.php |   39 ++++++++++-----------------------------
 1 files changed, 10 insertions(+), 29 deletions(-)

diff --git a/program/lib/Roundcube/bootstrap.php b/program/lib/Roundcube/bootstrap.php
index b7e69cb..3f4d2c3 100644
--- a/program/lib/Roundcube/bootstrap.php
+++ b/program/lib/Roundcube/bootstrap.php
@@ -39,13 +39,13 @@
 if (php_sapi_name() != 'cli') {
     $config += array(
         'suhosin.session.encrypt' => 0,
-        'session.auto_start'      => 0,
         'file_uploads'            => 1,
     );
 }
 
 foreach ($config as $optname => $optval) {
-    if ($optval != ini_get($optname) && @ini_set($optname, $optval) === false) {
+    $ini_optval = filter_var(ini_get($optname), FILTER_VALIDATE_BOOLEAN);
+    if ($optval != $ini_optval && @ini_set($optname, $optval) === false) {
         $error = "ERROR: Wrong '$optname' option value and it wasn't possible to set it to required value ($optval).\n"
             . "Check your PHP configuration (including php_admin_flag).";
         if (defined('STDERR')) fwrite(STDERR, $error); else echo $error;
@@ -58,7 +58,7 @@
 define('RCUBE_CHARSET', 'UTF-8');
 
 if (!defined('RCUBE_LIB_DIR')) {
-    define('RCUBE_LIB_DIR', dirname(__FILE__).'/');
+    define('RCUBE_LIB_DIR', dirname(__FILE__).DIRECTORY_SEPARATOR);
 }
 
 if (!defined('RCUBE_INSTALL_PATH')) {
@@ -81,6 +81,13 @@
 if (extension_loaded('mbstring')) {
     mb_internal_encoding(RCUBE_CHARSET);
     @mb_regex_encoding(RCUBE_CHARSET);
+}
+
+// make sure the Roundcube lib directory is in the include_path
+$rcube_include_path = realpath(RCUBE_LIB_DIR . '..');
+$sep = PATH_SEPARATOR;
+if (!preg_match("!(^|$sep)$rcube_include_path($sep|\$)!", ini_get('include_path'))) {
+    set_include_path(ini_get('include_path') . PATH_SEPARATOR . $rcube_include_path);
 }
 
 // Register autoloader
@@ -289,32 +296,6 @@
 {
     $regexp = $control_chars ? '/[^\x00-\x7F]/' : '/[^\x20-\x7E]/';
     return preg_match($regexp, $str) ? false : true;
-}
-
-
-/**
- * Remove single and double quotes from a given string
- *
- * @param string Input value
- *
- * @return string Dequoted string
- */
-function strip_quotes($str)
-{
-    return str_replace(array("'", '"'), '', $str);
-}
-
-
-/**
- * Remove new lines characters from given string
- *
- * @param string $str  Input value
- *
- * @return string Stripped string
- */
-function strip_newlines($str)
-{
-    return preg_replace('/[\r\n]/', '', $str);
 }
 
 

--
Gitblit v1.9.1