summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--framework/I18N/core/CultureInfo.php4
2 files changed, 3 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index f32c6e23..a43d17d3 100644
--- a/HISTORY
+++ b/HISTORY
@@ -8,6 +8,7 @@ BUG: Ticket#744 - Callback error handling is improved (Qiang)
BUG: Ticket#747 - TRangeValidator accept letters when type Integer is specified (Christophe)
BUG: Ticket#750 - The "expire" parameter is used inconsistently in cache modules (Qiang)
BUG: Ticket#753 - Themes not allways being set (Qiang)
+BUG: Ticket#754 - CultureInfo constructor errors (Qiang)
BUG: Ticket#759 - TSlider wrong layout with horizontal with center horizontal align (Christophe)
BUG: Ticket#776 - Logout button should not cause validation in blog tutorial (Qiang)
BUG: Ticket#785 - TDatePicker OnDateChanged event problem (Christophe)
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);
}