From 3af138adf92c58c7a0ff975f310a265ddb8ecf46 Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Fri, 24 Jun 2011 15:32:36 +0200 Subject: [PATCH] bacula-web: Renamed php class Utils to CUtils - Changed file path in config.inc.php --- gui/bacula-web/config.inc.php | 2 +- gui/bacula-web/includes/bweb.inc.php | 8 ++++---- gui/bacula-web/includes/utils/cutils.class.php | 2 +- gui/bacula-web/index.php | 4 ++-- gui/bacula-web/jobs.php | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gui/bacula-web/config.inc.php b/gui/bacula-web/config.inc.php index 2dcc796fb6..eb409cc400 100644 --- a/gui/bacula-web/config.inc.php +++ b/gui/bacula-web/config.inc.php @@ -32,7 +32,7 @@ require_once BW_OBJ . "cfg/config.class.php"; require_once BW_OBJ . "graph/bgraph.class.php"; require_once BW_OBJ . "bweb.inc.php"; - require_once BW_OBJ . "utils/utils.class.php"; + require_once BW_OBJ . "utils/cutils.class.php"; require_once BW_OBJ . "utils/timeutils.class.php"; // Global constants diff --git a/gui/bacula-web/includes/bweb.inc.php b/gui/bacula-web/includes/bweb.inc.php index 90a14f8b4f..e14ed2eb66 100644 --- a/gui/bacula-web/includes/bweb.inc.php +++ b/gui/bacula-web/includes/bweb.inc.php @@ -141,7 +141,7 @@ class Bweb extends DB }else die( "Unable to get database size
" . $result->getMessage() ); - return Utils::Get_Human_Size( $database_size ); + return CUtils::Get_Human_Size( $database_size ); } // end function GetDbSize() public function Get_Nb_Clients() @@ -218,7 +218,7 @@ class Bweb extends DB $media['expire'] = 'N/A'; } // Media used bytes in a human format - $media['volbytes'] = Utils::Get_Human_Size( $media['volbytes'] ); + $media['volbytes'] = CUtils::Get_Human_Size( $media['volbytes'] ); } else { $media['lastwritten'] = "N/A"; $media['expire'] = "N/A"; @@ -505,7 +505,7 @@ class Bweb extends DB $day = date( "D d", strtotime($end_date) ); if( isset( $tmp['stored_bytes'] ) ) { - $hbytes = Utils::Get_Human_Size( $tmp['stored_bytes'], 3, 'GB' ); + $hbytes = CUtils::Get_Human_Size( $tmp['stored_bytes'], 3, 'GB' ); $hbytes = explode( " ", $hbytes ); $stored_bytes = $hbytes[0]; } @@ -531,7 +531,7 @@ class Bweb extends DB $day = date( "D d", strtotime($end_date) ); if( isset( $tmp['stored_bytes'] ) ) { - $hbytes = Utils::Get_Human_Size( $tmp['stored_bytes'], 3, 'GB' ); + $hbytes = CUtils::Get_Human_Size( $tmp['stored_bytes'], 3, 'GB' ); $hbytes = explode( " ", $hbytes ); $stored_bytes = $hbytes[0]; } diff --git a/gui/bacula-web/includes/utils/cutils.class.php b/gui/bacula-web/includes/utils/cutils.class.php index b9eddfb315..7b38c83f62 100644 --- a/gui/bacula-web/includes/utils/cutils.class.php +++ b/gui/bacula-web/includes/utils/cutils.class.php @@ -14,7 +14,7 @@ | GNU General Public License for more details. | +-------------------------------------------------------------------------+ */ -class Utils { +class CUtils { static public function Get_Human_Size( $size, $decimal = 2, $unit = 'auto' ) { $unit_id = 0; diff --git a/gui/bacula-web/index.php b/gui/bacula-web/index.php index 9e912ca06e..2672381fb1 100644 --- a/gui/bacula-web/index.php +++ b/gui/bacula-web/index.php @@ -31,11 +31,11 @@ $dbSql->tpl->assign('database_size', $dbSql->GetDbSize()); // Overall stored bytes $result = $dbSql->GetStoredBytes( ALL ); -$dbSql->tpl->assign('stored_bytes', Utils::Get_Human_Size( $result['stored_bytes'] ) ); +$dbSql->tpl->assign('stored_bytes', CUtils::Get_Human_Size( $result['stored_bytes'] ) ); // Total stored bytes since last 24 hours $result = $dbSql->GetStoredBytes( LAST_DAY ); -$dbSql->tpl->assign('bytes_last', Utils::Get_Human_Size( $result['stored_bytes'] ) ); +$dbSql->tpl->assign('bytes_last', CUtils::Get_Human_Size( $result['stored_bytes'] ) ); // Total stored files since last 24 hours $files_last = $dbSql->GetStoredFiles( LAST_DAY ); diff --git a/gui/bacula-web/jobs.php b/gui/bacula-web/jobs.php index 794ca3d002..665d8be8c3 100644 --- a/gui/bacula-web/jobs.php +++ b/gui/bacula-web/jobs.php @@ -123,7 +123,7 @@ // Job Level $job['Level'] = $job_level[ $job['Level'] ]; // Job Size - $job['JobBytes'] = Utils::Get_Human_Size( $job['JobBytes'] ); + $job['JobBytes'] = CUtils::Get_Human_Size( $job['JobBytes'] ); array_push( $last_jobs, $job); } -- 2.39.5