From ce0c9561e9068d5dab9c473f1ca0709b0d222cf1 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 22 Nov 2012 17:26:29 +0200 Subject: Fix issue #118 (manually implementing PR #1832) --- user_guide_src/source/changelog.rst | 5 ++++- user_guide_src/source/libraries/language.rst | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e523c4cab..8de9d2f42 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -251,7 +251,9 @@ Release Date: Not Released - :doc:`Encryption Library ` changes include: - Added support for hashing algorithms other than SHA1 and MD5. - Removed previously deprecated ``sha1()`` method. - - Changed :doc:`Language Library ` method ``load()`` to filter the language name with ``ctype_digit()``. + - :doc:`Language Library ` changes include: + - Changed method ``load()`` to filter the language name with ``ctype_digit()``. + - Added an optional second parameter to method ``line()`` to disable error login for line keys that were not found. - :doc:`Profiler Library ` now also displays database object names. - :doc:`Migration Library ` changes include: - Added support for timestamp-based migrations (enabled by default). @@ -450,6 +452,7 @@ Bug fixes for 3.0 - Fixed a bug (#1978) - :doc:`Directory Helper ` function :php:func:`directory_map()`'s return array didn't make a distinction between directories and file indexes when a directory with a numeric name is present. - Fixed a bug (#777) - :doc:`Loader Library ` didn't look for helper extensions in added package paths. - Fixed a bug (#18) - :doc:`APC Cache ` driver didn't (un)serialize data, resulting in failure to store objects. +- Fixed a bug (#188) - :doc:`Unit Testing Library ` filled up logs with error messages for non-existing language keys. Version 2.1.3 ============= diff --git a/user_guide_src/source/libraries/language.rst b/user_guide_src/source/libraries/language.rst index b231f14a3..772f70d0b 100644 --- a/user_guide_src/source/libraries/language.rst +++ b/user_guide_src/source/libraries/language.rst @@ -66,9 +66,14 @@ text using this function:: $this->lang->line('language_key'); -Where language_key is the array key corresponding to the line you wish +Where *language_key* is the array key corresponding to the line you wish to show. +You can optionally pass FALSE as the second argument of that method to +disable error logging, in case you're not sure if the line exists:: + + $this->lang->line('misc_key', FALSE); + .. note:: This method simply returns the line. It does not echo it. Using language lines as form labels -- cgit v1.2.3-24-g4f1b