somewhat nicer reporting about burned backups (it should report details
authordpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Mon, 10 Oct 2005 10:25:37 +0000 (10:25 +0000)
committerdpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Mon, 10 Oct 2005 10:25:37 +0000 (10:25 +0000)
instead of ids)

git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@150 8392b6e1-25fa-0310-8288-cc32f8e212ea

lib/BackupPC/CGI/BurnMedia.pm

index 0cdfcf7..b62f304 100644 (file)
@@ -88,16 +88,27 @@ EOF
 
                                $dbh->commit();
 
-                               $cont .= qq{
-                                       Archived following backups:
-                               } . join(",", @selected_backup_ids) . qq{
-                                       <br/>with following message:
-                                       <div style="border: 1px solid #e0e0e0">
-                               } . $In{'note'} . qq{
-                                       </div>
-                               };
                        }
+
+                       my ($dvd_nr) = $dbh->selectrow_array(qq{
+                               select last_value from dvd_nr
+                       });
+
+                       $dvd_nr ||= 'error';
+
                        $dbh->commit();
+
+                       $cont .= q{
+                               Archived following backups:
+                       } . join(", ", @selected_backup_ids) . q{
+                               <br/>with total size of
+                       <b>} . sprintf("%1.2f Mb", $total_size / 1024) . q{</b>
+                               to media <b>} . $dvd_nr . q{</b>
+                               with following message:
+                               <div style="background-color: #e0e0e0; display: inline; padding: 2px;">
+                       } . $In{'note'} . q{
+                               </div>
+                       };
                }
        }