summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2008-01-22 08:35:40 +0100
committerDerek Allard <derek.allard@ellislab.com>2008-01-22 08:35:40 +0100
commit86abae953843715fab4a3bccb98f7c9eb6d3bc13 (patch)
tree067fc1ca233208f5555ac3b68339ce378e754654
parent12f9cc8fc102389bd232f35921b4bd6c4daa9c31 (diff)
Fixed a bug (#3015) in the User Agent library where more then 2 languages where not reported with languages().
-rw-r--r--system/libraries/User_agent.php2
-rw-r--r--user_guide/changelog.html3
2 files changed, 3 insertions, 2 deletions
diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php
index 9fa45c8a5..ff6d4a933 100644
--- a/system/libraries/User_agent.php
+++ b/system/libraries/User_agent.php
@@ -256,7 +256,7 @@ class CI_User_agent {
{
if ((count($this->languages) == 0) AND isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) AND $_SERVER['HTTP_ACCEPT_LANGUAGE'] != '')
{
- $languages = preg_replace('/(;q=.+)/i', '', strtolower(trim($_SERVER['HTTP_ACCEPT_LANGUAGE'])));
+ $languages = preg_replace('/(;q=[0-9\.]+)/i', '', strtolower(trim($_SERVER['HTTP_ACCEPT_LANGUAGE'])));
$this->languages = explode(',', $languages);
}
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 78861b44b..271d0e277 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -161,7 +161,8 @@ Change Log
<li>Fixed a bug in the <a href="./libraries/email.html">Email</a> library where some timezones were calculated incorrectly. </li>
<li>Fixed a bug in <a href="./libraries/validation.html">Validation</a> where <kbd>valid_ip()</kbd> wasn't called properly.</li>
<li>Fixed a bug in <a href="./libraries/validation.html">Validation</a> where individual error messages for checkboxes wasn't supported.</li>
- <li>Fixed a bug in the Session library where user agent matching would fail on user agents ending with a space. </li>
+ <li>Fixed a bug (#3015) in the <a href="./libraries/user_agent.html">User Agent library</a> where more then 2 languages where not reported with languages().</li>
+ <li>Fixed a bug in the <a href="./libraries/sessions.html">Session library</a> where user agent matching would fail on user agents ending with a space. </li>
<li>Fixed a bug in database driver where num_rows property wasn't getting updated.</li>
<li>Fixed a bug in captcha calling an invalid PHP function.</li>
<li>Fixed a bug in <kbd>_html_entity_decode_callback()</kbd> when 'global_xss_filtering' is enabled.</li>