瀏覽代碼

Just in case....

stevetruckstuff 19 年之前
父節點
當前提交
81c19aee65
共有 1 個文件被更改,包括 15 次插入1 次删除
  1. 15 1
      templates/util_global.php

+ 15 - 1
templates/util_global.php

@@ -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);
 }
+