diff options
author | Renato Botelho <renato@netgate.com> | 2015-06-29 07:41:15 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-06-29 07:41:15 -0300 |
commit | 8e0277394c352ded2a414162f079f7f5da7b0395 (patch) | |
tree | 9ba89c0880dcac506e44c42f42309dd4cfd81317 /config | |
parent | 6bb72c8d94de738005f1d67b9227f1d863c91434 (diff) | |
parent | 3a0e7e34c9c39fafd935357bed0d4bf27522c42b (diff) | |
download | pfsense-packages-8e0277394c352ded2a414162f079f7f5da7b0395.tar.gz pfsense-packages-8e0277394c352ded2a414162f079f7f5da7b0395.tar.bz2 pfsense-packages-8e0277394c352ded2a414162f079f7f5da7b0395.zip |
Merge pull request #890 from phil-davis/backup
Diffstat (limited to 'config')
-rw-r--r-- | config/backup/backup.inc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/config/backup/backup.inc b/config/backup/backup.inc index df508775..748b7fc6 100644 --- a/config/backup/backup.inc +++ b/config/backup/backup.inc @@ -32,16 +32,17 @@ */ -function byte_convert( $bytes ) { - if ($bytes<=0) - return '0 Byte'; - - $convention=1000; //[1000->10^x|1024->2^x] - $s=array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB'); - $e=floor(log($bytes,$convention)); - return round($bytes/pow($convention,$e),2).' '.$s[$e]; +if (!function_exists("byte_convert")) { + function byte_convert( $bytes ) { + if ($bytes<=0) + return '0 Byte'; + + $convention=1000; //[1000->10^x|1024->2^x] + $s=array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB'); + $e=floor(log($bytes,$convention)); + return round($bytes/pow($convention,$e),2).' '.$s[$e]; + } } - function backup_sync_package_php() { |