summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
Diffstat (limited to 'system/core')
-rw-r--r--system/core/Hooks.php8
-rw-r--r--system/core/Lang.php2
2 files changed, 5 insertions, 5 deletions
diff --git a/system/core/Hooks.php b/system/core/Hooks.php
index 57e4a99a6..4ec7698d7 100644
--- a/system/core/Hooks.php
+++ b/system/core/Hooks.php
@@ -99,14 +99,14 @@ class CI_Hooks {
}
// Grab the "hooks" definition file.
- if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/hooks.php'))
+ if (file_exists(APPPATH.'config/hooks.php'))
{
- include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php');
+ include(APPPATH.'config/hooks.php');
}
- if (file_exists(APPPATH.'config/hooks.php'))
+ if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/hooks.php'))
{
- include(APPPATH.'config/hooks.php');
+ include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php');
}
// If there are no hooks, we're done.
diff --git a/system/core/Lang.php b/system/core/Lang.php
index c0cd34a3d..9aaf944ce 100644
--- a/system/core/Lang.php
+++ b/system/core/Lang.php
@@ -106,7 +106,7 @@ class CI_Lang {
$langfile .= '.php';
- if (empty($idiom) OR ! ctype_alpha($idiom))
+ if (empty($idiom) OR ! preg_match('/^[a-z_-]$/i', $idiom))
{
$config =& get_config();
$idiom = empty($config['language']) ? 'english' : $config['language'];