Just in case....
authorstevetruckstuff <stevetruckstuff@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 18 Sep 2006 14:57:18 +0000 (14:57 +0000)
committerstevetruckstuff <stevetruckstuff@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 18 Sep 2006 14:57:18 +0000 (14:57 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11714 7612ce4b-ef26-0410-bec9-ea0150e637f0

templates/util_global.php

index 9969c2f..b2eee61 100644 (file)
@@ -91,5 +91,19 @@ function getIconPath ($icon_theme_path, $icon_name) {
 function displayErrors () {
     global $oErrorHandler;
     
-    $oErrorHandler->displayErrors();
+    if ($oErrorHandler) {
+        $oErrorHandler->displayErrors();
+    }
+}
+
+/**
+ * Make the internal show_readable_size() function available to templates.
+ * 
+ * @param int size to be converted to human-readable
+ * @return string human-readable form
+ * @since 1.5.2
+ **/
+function humanReadableSize ($size) {
+    return show_readable_size($size);
 }
+