From 0cf99f9a6c1a797017c146d8a7f19da934c153c4 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Sun, 30 Jul 2006 16:22:01 +0000 Subject: a few updates/fixes for localplay --- lib/general.lib.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'lib') diff --git a/lib/general.lib.php b/lib/general.lib.php index c3c1e061..654bc5ac 100644 --- a/lib/general.lib.php +++ b/lib/general.lib.php @@ -956,4 +956,25 @@ function translate_pattern_code($code) { } // translate_pattern_code + +/** + * print_boolean + * This function takes a boolean value and then print out a friendly + * text message, usefull if you have a 0/1 that you need to turn into + * a "Off" "On" + */ +function print_boolean($value) { + + + if ($value) { + $string = '' . _('On') . ''; + } + else { + $string = '' . _('Off') . ''; + } + + return $string; + +} // print_boolean + ?> -- cgit