Skip to content
Browse files

Merge branch '3.2/release/3.2.2' into 3.2/master

Conflicts:
	classes/kohana/core.php
  • Loading branch information...
2 parents 7da9089 + 8c4dc24 commit 24a6d0b43af411341429b45b5776b7b3214f1658 @zombor zombor committed Aug 30, 2012
Showing with 16 additions and 3 deletions.
  1. +2 −2 classes/kohana/core.php
  2. +13 −1 classes/kohana/url.php
  3. +1 −0 config/user_agents.php
View
4 classes/kohana/core.php
@@ -16,8 +16,8 @@
class Kohana_Core {
// Release version and codename
- const VERSION = '3.2.1';
- const CODENAME = 'Milvago';
+ const VERSION = '3.2.2';
+ const CODENAME = 'hypoleucos';
// Common environment type constants for consistency and convenience
const PRODUCTION = 10;
View
14 classes/kohana/url.php
@@ -112,14 +112,26 @@ public static function site($uri = '', $protocol = NULL, $index = TRUE)
if ( ! UTF8::is_ascii($path))
{
// Encode all non-ASCII characters, as per RFC 1738
- $path = preg_replace('~([^/]+)~e', 'rawurlencode("$1")', $path);
+ $path = preg_replace_callback('~([^/]+)~', 'URL::_rawurlencode_callback', $path);
}
// Concat the URL
return URL::base($protocol, $index).$path;
}
/**
+ * Callback used for encoding all non-ASCII characters, as per RFC 1738
+ * Used by URL::site()
+ *
+ * @param array $matches Array of matches from preg_replace_callback()
+ * @return string Encoded string
+ */
+ protected static function _rawurlencode_callback($matches)
+ {
+ return rawurlencode($matches[0]);
+ }
+
+ /**
* Merges the current GET parameters with an array of new or overloaded
* parameters and returns the resulting query string.
*
View
1 config/user_agents.php
@@ -3,6 +3,7 @@
return array(
'platform' => array(
+ 'windows nt 6.2' => 'Windows 8',
'windows nt 6.1' => 'Windows 7',
'windows nt 6.0' => 'Windows Vista',
'windows nt 5.2' => 'Windows 2003',

0 comments on commit 24a6d0b

Please sign in to comment.
Something went wrong with that request. Please try again.