From be9aacaa5296dfca63fb3a01c2dc52538d1546aa Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Sat, 17 Nov 2012 12:31:31 -0500
Subject: [PATCH] Bring back lost localization for the about page

---
 program/include/iniset.php |   31 +++++++++++++++----------------
 1 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/program/include/iniset.php b/program/include/iniset.php
index c397608..82278c9 100644
--- a/program/include/iniset.php
+++ b/program/include/iniset.php
@@ -18,24 +18,25 @@
  | Author: Till Klampaeckel <till@php.net>                               |
  |         Thomas Bruederli <roundcube@gmail.com>                        |
  +-----------------------------------------------------------------------+
-
- $Id$
-
 */
 
-// Some users are not using Installer, so we'll check some
-// critical PHP settings here. Only these, which doesn't provide
-// an error/warning in the logs later. See (#1486307).
-$crit_opts = array(
-    'mbstring.func_overload' => 0,
+$config = array(
+    'error_reporting'         => E_ALL &~ (E_NOTICE | E_STRICT),
+    // Some users are not using Installer, so we'll check some
+    // critical PHP settings here. Only these, which doesn't provide
+    // an error/warning in the logs later. See (#1486307).
+    'mbstring.func_overload'  => 0,
     'suhosin.session.encrypt' => 0,
-    'session.auto_start' => 0,
-    'file_uploads' => 1,
-    'magic_quotes_runtime' => 0,
+    'session.auto_start'      => 0,
+    'file_uploads'            => 1,
+    'magic_quotes_runtime'    => 0,
+    'magic_quotes_sybase'     => 0, // #1488506
 );
-foreach ($crit_opts as $optname => $optval) {
-    if ($optval != ini_get($optname)) {
-        die("ERROR: Wrong '$optname' option value. Read REQUIREMENTS section in INSTALL file or use Roundcube Installer, please!");
+foreach ($config as $optname => $optval) {
+    if ($optval != ini_get($optname) && @ini_set($optname, $optval) === false) {
+        die("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).\n"
+            ."Read REQUIREMENTS section in INSTALL file or use Roundcube Installer!");
     }
 }
 
@@ -61,8 +62,6 @@
 if (set_include_path($include_path) === false) {
     die("Fatal error: ini_set/set_include_path does not work.");
 }
-
-ini_set('error_reporting', E_ALL &~ (E_NOTICE | E_STRICT));
 
 // increase maximum execution time for php scripts
 // (does not work in safe mode)

--
Gitblit v1.9.1