]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Fixed Expire Date on Volumes
authorDavide Franco <bacula-dev@dflc.ch>
Mon, 29 Nov 2010 17:26:05 +0000 (18:26 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:39:41 +0000 (14:39 +0200)
 - Expire date only displayed on Full volume with valid LastWritten date

gui/bacula-web/classes.inc.php

index b04188141f4b2d5656a2f8df4c0e183b3da55f3b..5bde6b7031cc7d1cfb7582ce2d7a7191ccf69e8a 100644 (file)
@@ -333,10 +333,10 @@ class Bweb extends DB {
                                                        if( $medias->numRows() == 0 ) {
                                                                if( $debug ) echo "No media in pool " . $pool['name'] . "<br />";
                                                        } 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'] );