summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspleshka2013-07-01 09:28:45 (GMT)
committerspleshka2013-07-01 09:28:45 (GMT)
commit2f5b65e888c7a9e0a3da90462b6703c5ffe2e60d (patch)
tree32db9cc8ef724e7e35e2f53486bbe0bbcbac6988
parentbae39d8f1b8f8e6e3d6fb3f681c73ae2e1bbd975 (diff)
Restore expire_print_r() function for compatibility with modules that may use this function for debug purposes (like Purge module does).7.x-2.0-beta2
-rw-r--r--expire.module13
1 files changed, 13 insertions, 0 deletions
diff --git a/expire.module b/expire.module
index 985c0d7..b532b60 100644
--- a/expire.module
+++ b/expire.module
@@ -233,3 +233,16 @@ function _expire_get_expiration_handler($type) {
}
return $cache_objects[$type];
}
+
+/**
+ * Simple print_r to html function.
+ *
+ * @param $data
+ * Array with output data.
+ *
+ * @return string
+ * print_r contents in nicely formatted html.
+ */
+function expire_print_r($data) {
+ return str_replace(' ', '    ', nl2br(htmlentities(print_r($data, TRUE))));
+}