From: Davide Franco Date: Mon, 29 Nov 2010 17:26:05 +0000 (+0100) Subject: bacula-web: Fixed Expire Date on Volumes X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0a3be2d120c30c5adc7338c4a5b2b8d5cf7f7cee;p=bacula%2Fbacula bacula-web: Fixed Expire Date on Volumes - Expire date only displayed on Full volume with valid LastWritten date --- diff --git a/gui/bacula-web/classes.inc.php b/gui/bacula-web/classes.inc.php index b04188141f..5bde6b7031 100644 --- a/gui/bacula-web/classes.inc.php +++ b/gui/bacula-web/classes.inc.php @@ -333,10 +333,10 @@ class Bweb extends DB { if( $medias->numRows() == 0 ) { if( $debug ) echo "No media in pool " . $pool['name'] . "
"; } else { - if( $media['lastwritten'] != "0000-00-00 00:00:00" ) { + if( ($media['lastwritten'] != "0000-00-00 00:00:00") && $media['volstatus'] == 'Full' ) { // Calculate expiration date $expire_date = strtotime($media['lastwritten']) + $media['volretention']; - $media['expire'] = strftime("%Y-%M-%D", $expire_date); + $media['expire'] = strftime("%Y-%m-%d", $expire_date); // Media used size in a more readable format $media['volbytes'] = $this->human_file_size( $media['volbytes'] );