aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/boot.php b/boot.php
index 27c801923..b81bd9cfc 100644
--- a/boot.php
+++ b/boot.php
@@ -2908,3 +2908,15 @@ function get_plugin_info($plugin){
}
return $info;
}}
+
+if(! function_exists('return_bytes')) {
+function return_bytes ($size_str) {
+ switch (substr ($size_str, -1))
+ {
+ case 'M': case 'm': return (int)$size_str * 1048576;
+ case 'K': case 'k': return (int)$size_str * 1024;
+ case 'G': case 'g': return (int)$size_str * 1073741824;
+ default: return $size_str;
+ }
+}}
+