From f49c407d587d35fc12ad27c045fbcb51f89f59f8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 24 May 2012 14:57:33 +0300 Subject: Fix issue #1388 --- system/core/Lang.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/core/Lang.php') diff --git a/system/core/Lang.php b/system/core/Lang.php index 5cb0cad71..73c9127ac 100755 --- a/system/core/Lang.php +++ b/system/core/Lang.php @@ -65,14 +65,14 @@ class CI_Lang { /** * Load a language file * - * @param mixed the name of the language file to be loaded. Can be an array + * @param mixed the name of the language file to be loaded * @param string the language (english, etc.) * @param bool return loaded array of translations * @param bool add suffix to $langfile * @param string alternative path to look for language file * @return mixed */ - public function load($langfile = '', $idiom = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '') + public function load($langfile, $idiom = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '') { $langfile = str_replace('.php', '', $langfile); -- cgit v1.2.3-24-g4f1b From ed944a3c70a0bad158cd5a6ca5ce1f2e717aff5d Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 2 Jun 2012 11:07:47 +0100 Subject: Replaced `==` with `===` and `!=` with `!==` in /system/core --- system/core/Lang.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'system/core/Lang.php') diff --git a/system/core/Lang.php b/system/core/Lang.php index 73c9127ac..3001f1b13 100755 --- a/system/core/Lang.php +++ b/system/core/Lang.php @@ -76,26 +76,26 @@ class CI_Lang { { $langfile = str_replace('.php', '', $langfile); - if ($add_suffix == TRUE) + if ($add_suffix === TRUE) { $langfile = str_replace('_lang', '', $langfile).'_lang'; } $langfile .= '.php'; - if ($idiom == '') + if ($idiom === '') { $config =& get_config(); $idiom = ( ! empty($config['language'])) ? $config['language'] : 'english'; } - if ($return == FALSE && isset($this->is_loaded[$langfile]) && $this->is_loaded[$langfile] === $idiom) + if ($return === FALSE && isset($this->is_loaded[$langfile]) && $this->is_loaded[$langfile] === $idiom) { return; } // Determine where the language file is and load it - if ($alt_path != '' && file_exists($alt_path.'language/'.$idiom.'/'.$langfile)) + if ($alt_path !== '' && file_exists($alt_path.'language/'.$idiom.'/'.$langfile)) { include($alt_path.'language/'.$idiom.'/'.$langfile); } @@ -124,14 +124,14 @@ class CI_Lang { { log_message('error', 'Language file contains no data: language/'.$idiom.'/'.$langfile); - if ($return == TRUE) + if ($return === TRUE) { return array(); } return; } - if ($return == TRUE) + if ($return === TRUE) { return $lang; } @@ -153,7 +153,7 @@ class CI_Lang { */ public function line($line = '') { - $value = ($line == '' OR ! isset($this->language[$line])) ? FALSE : $this->language[$line]; + $value = ($line === '' OR ! isset($this->language[$line])) ? FALSE : $this->language[$line]; // Because killer robots like unicorns! if ($value === FALSE) -- cgit v1.2.3-24-g4f1b From 0d2c06ea1d96ea3f35dd1e7856977a24cec43233 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Jun 2012 02:33:45 +0300 Subject: Change file permissions for system/core/*.php and system/database/DB.php so that they don't differ from the rest --- system/core/Lang.php | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 system/core/Lang.php (limited to 'system/core/Lang.php') diff --git a/system/core/Lang.php b/system/core/Lang.php old mode 100755 new mode 100644 -- cgit v1.2.3-24-g4f1b