From b75faa1a03a32330e412f0bd0332fb9fa389e914 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Fri, 27 Apr 2012 12:03:32 -0400 Subject: Fix rest of the helpers --- system/helpers/language_helper.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'system/helpers/language_helper.php') diff --git a/system/helpers/language_helper.php b/system/helpers/language_helper.php index b31c97107..34f030716 100644 --- a/system/helpers/language_helper.php +++ b/system/helpers/language_helper.php @@ -37,17 +37,17 @@ // ------------------------------------------------------------------------ -/** - * Lang - * - * Fetches a language variable and optionally outputs a form label - * - * @param string the language line - * @param string the id of the form element - * @return string - */ if ( ! function_exists('lang')) { + /** + * Lang + * + * Fetches a language variable and optionally outputs a form label + * + * @param string the language line + * @param string the id of the form element + * @return string + */ function lang($line, $id = '') { $CI =& get_instance(); -- cgit v1.2.3-24-g4f1b From 773ccc318f2769c9b7579630569b5d8ba47b114b Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 2 Jun 2012 11:11:08 +0100 Subject: Replaced `==` with `===` and `!=` with `!==` in /system/helpers --- system/helpers/language_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers/language_helper.php') diff --git a/system/helpers/language_helper.php b/system/helpers/language_helper.php index 34f030716..bd567ed79 100644 --- a/system/helpers/language_helper.php +++ b/system/helpers/language_helper.php @@ -53,7 +53,7 @@ if ( ! function_exists('lang')) $CI =& get_instance(); $line = $CI->lang->line($line); - if ($id != '') + if ($id !== '') { $line = ''; } -- cgit v1.2.3-24-g4f1b From c5536aac5752054f7f76e448d58b86407d8f574e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Nov 2012 17:33:58 +0200 Subject: Manually apply PR #1594 (fixing phpdoc page-level generation/warnings) Also partially fixes issue #1295, fixes inconsistencies in some page-level docblocks and adds include checks in language files. --- system/helpers/language_helper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'system/helpers/language_helper.php') diff --git a/system/helpers/language_helper.php b/system/helpers/language_helper.php index bd567ed79..658be6de7 100644 --- a/system/helpers/language_helper.php +++ b/system/helpers/language_helper.php @@ -1,4 +1,4 @@ - Date: Mon, 26 Nov 2012 23:55:37 +0200 Subject: Language helper lang() to accept optional HTML attributes (an improved version of PR #1235) --- system/helpers/language_helper.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'system/helpers/language_helper.php') diff --git a/system/helpers/language_helper.php b/system/helpers/language_helper.php index 658be6de7..f931208e1 100644 --- a/system/helpers/language_helper.php +++ b/system/helpers/language_helper.php @@ -45,18 +45,19 @@ if ( ! function_exists('lang')) * * Fetches a language variable and optionally outputs a form label * - * @param string the language line - * @param string the id of the form element + * @param string $line The language line + * @param string $for The "for" value (id of the form element) + * @param array $attributes Any additional HTML attributes * @return string */ - function lang($line, $id = '') + function lang($line, $for = '', $attributes = array()) { $CI =& get_instance(); $line = $CI->lang->line($line); if ($id !== '') { - $line = ''; + $line = ''; } return $line; -- cgit v1.2.3-24-g4f1b From 719b60f7e84e7060b679a9359a487f5cbbb937bf Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 27 Nov 2012 00:05:06 +0200 Subject: Fix some erroneous variable names (sorry) --- system/helpers/language_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/helpers/language_helper.php') diff --git a/system/helpers/language_helper.php b/system/helpers/language_helper.php index f931208e1..6d24a9ca6 100644 --- a/system/helpers/language_helper.php +++ b/system/helpers/language_helper.php @@ -55,9 +55,9 @@ if ( ! function_exists('lang')) $CI =& get_instance(); $line = $CI->lang->line($line); - if ($id !== '') + if ($for !== '') { - $line = ''; + $line = ''; } return $line; -- cgit v1.2.3-24-g4f1b