diff options
author | xue <> | 2008-03-12 18:01:41 +0000 |
---|---|---|
committer | xue <> | 2008-03-12 18:01:41 +0000 |
commit | 7e5a685ed31b65ddd75196d4616ab142c39af8d9 (patch) | |
tree | 8b9f36caaf8d74329822839610b6d3b752a87da6 /framework/I18N | |
parent | 571e32211bfe035eda916f288384d029c378fa4b (diff) |
fixed #754.
Diffstat (limited to 'framework/I18N')
-rw-r--r-- | framework/I18N/core/CultureInfo.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/I18N/core/CultureInfo.php b/framework/I18N/core/CultureInfo.php index 15370ebe..41b3bf45 100644 --- a/framework/I18N/core/CultureInfo.php +++ b/framework/I18N/core/CultureInfo.php @@ -220,7 +220,7 @@ class CultureInfo */
public function validCulture($culture)
{
- if(preg_match('/^[a-z]{2}(_[A-Z]{2,5}){0,2}$/', $culture))
+ if(preg_match('/^[_\\w]+$/', $culture))
return is_file(self::dataDir().$culture.self::fileExt());
return false;
@@ -235,7 +235,7 @@ class CultureInfo {
if(!empty($culture))
{
- if (!preg_match('/^[a-z]{2}(_[A-Z]{2,5}){0,2}$/', $culture))
+ if (!preg_match('/^[_\\w]+$/', $culture))
throw new Exception('Invalid culture supplied: ' . $culture);
}
|