]> git.mxchange.org Git - friendica.git/blobdiff - include/Photo.php
moved formatBytes() to /include/text.php
[friendica.git] / include / Photo.php
index 0adc55258bac8a0d2f2ce5eedf9d72105d72d3e4..785601c7e4eb3e15584645f7c9c660fa8d31d3f6 100644 (file)
@@ -1014,14 +1014,3 @@ function store_photo($a, $uid, $imagedata = "", $url = "") {
        return($image);
 }
 
-function formatBytes($bytes, $precision = 2) { 
-        $units = array('B', 'KB', 'MB', 'GB', 'TB'); 
-
-       $bytes = max($bytes, 0); 
-       $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); 
-       $pow = min($pow, count($units) - 1); 
-
-       $bytes /= pow(1024, $pow);
-
-       return round($bytes, $precision) . ' ' . $units[$pow]; 
-}