]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Removed useless human_file_size function from bweb.inc.php
authorDavide Franco <bacula-dev@dflc.ch>
Mon, 13 Jun 2011 18:21:01 +0000 (20:21 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:12 +0000 (14:49 +0200)
gui/bacula-web/includes/bweb.inc.php

index d4b877d3e5e54c3e669a280f6e610d4cd39745c1..60c1182fd491fdbaeba803b573732fd16dd2a9be 100644 (file)
@@ -112,41 +112,7 @@ class Bweb extends DB {
        {
                $this->db_link->disconnect();
     }      
-         
-       // Return humanized size with default unit of GB
-       // if auto provide for unit argument, automaticaly decide which unit
-       function human_file_size( $size, $decimal = 2, $unit = 'auto' )
-       {
-               $unit_id = 0;
-               $lisible = false;
-               $units = array('B','KB','MB','GB','TB');
-               $hsize = $size;
-
-               switch( $unit )
-               {
-                       case 'auto';
-                               while( !$lisible ) {
-                                       if ( $hsize >= 1024 ) {
-                                               $hsize    = $hsize / 1024;
-                                               $unit_id += 1;
-                                       }        
-                                       else
-                                               $lisible = true;
-                               } // end while
-                       break;
-                       
-                       default:
-                               $p = array_search( $unit, $units);
-                               $hsize = $hsize / pow(1024,$p);
-                       break;
-               } // end switch
-               
-               $hsize = sprintf("%." . $decimal . "f", $hsize);
-               $hsize = $hsize . ' ' . $units[$unit_id];
-               return $hsize;
-       } // end function
-
-       
+       
        function GetDbSize() 
        {
                $database_size  = 0;