From cffe97eb6ede164d8169dda4e8922baea3dda0e1 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sun, 13 Sep 2015 08:50:48 -0400
Subject: [PATCH] CS improvements + some doc
---
program/include/rcmail.php | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index faf7af8..b2ab79a 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -178,9 +178,11 @@
// set localization
setlocale(LC_ALL, $lang . '.utf8', $lang . '.UTF-8', 'en_US.utf8', 'en_US.UTF-8');
- // workaround for http://bugs.php.net/bug.php?id=18556
- if (PHP_VERSION_ID < 50500 && in_array($lang, array('tr_TR', 'ku', 'az_AZ'))) {
- setlocale(LC_CTYPE, 'en_US.utf8', 'en_US.UTF-8');
+ // Workaround for http://bugs.php.net/bug.php?id=18556
+ // Also strtoupper/strtolower and other methods are locale-aware
+ // for these locales it is problematic (#1490519)
+ if (in_array($lang, array('tr_TR', 'ku', 'az_AZ'))) {
+ setlocale(LC_CTYPE, 'en_US.utf8', 'en_US.UTF-8', 'C');
}
}
@@ -808,7 +810,7 @@
// remove old token from the path
$base_path = rtrim($base_path, '/');
- $base_path = preg_replace('/\/[a-f0-9]{' . strlen($token) . '}$/', '', $base_path);
+ $base_path = preg_replace('/\/[a-zA-Z0-9]{' . strlen($token) . '}$/', '', $base_path);
// this need to be full url to make redirects work
$absolute = true;
--
Gitblit v1.9.1