summaryrefslogtreecommitdiffstats
path: root/lib/general.lib.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/general.lib.php')
-rw-r--r--lib/general.lib.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/general.lib.php b/lib/general.lib.php
index 7fcb86e9..13951642 100644
--- a/lib/general.lib.php
+++ b/lib/general.lib.php
@@ -944,4 +944,19 @@ function print_boolean($value) {
} // print_boolean
+/**
+ * invert_boolean
+ * This returns the opposite of what you've got
+ */
+function invert_boolean($value) {
+
+ if (make_bool($value)) {
+ return '0';
+ }
+ else {
+ return '1';
+ }
+
+} // invert_boolean
+
?>