* checkin with 3.2.0beta0 release header
[BackupPC.git] / lib / BackupPC / CGI / DirHistory.pm
index 11de3d9..2ba2aff 100644 (file)
@@ -10,7 +10,7 @@
 #   Craig Barratt  <cbarratt@users.sourceforge.net>
 #
 # COPYRIGHT
-#   Copyright (C) 2003  Craig Barratt
+#   Copyright (C) 2003-2007  Craig Barratt
 #
 #   This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@
 #
 #========================================================================
 #
-# Version 2.1.0beta2, released 23 May 2004.
+# Version 3.2.0beta0, released 5 April 2009.
 #
 # See http://backuppc.sourceforge.net.
 #
@@ -40,6 +40,7 @@ use strict;
 use BackupPC::CGI::Lib qw(:all);
 use BackupPC::View;
 use BackupPC::Attrib qw(:all);
+use Encode;
 
 sub action
 {
@@ -61,7 +62,7 @@ sub action
     ErrorExit($Lang->{Empty_host_name}) if ( $host eq "" );
 
     my @Backups = $bpc->BackupInfoRead($host);
-    my $view = BackupPC::View->new($bpc, $host, \@Backups);
+    my $view = BackupPC::View->new($bpc, $host, \@Backups, {inode => 1});
     my $hist = $view->dirHistory($share, $dir);
     my($backupNumStr, $backupTimeStr, $fileStr);
 
@@ -85,6 +86,7 @@ sub action
        my %inode2name;
        my $nameCnt = 0;
        (my $fDisp  = "${EscHTML($f)}") =~ s/ /&nbsp;/g;
+        $fDisp      = decode_utf8($fDisp);
        $fileStr   .= "<tr><td align=\"left\"  class=\"histView\">$fDisp</td>";
        my($colSpan, $url, $inode, $type);
        my $tdClass = ' class="histView"';
@@ -162,7 +164,7 @@ EOF
        $fileStr .= "</tr>\n";
     }
 
-    my $dirDisplay = "$share/$dir";
+    my $dirDisplay = decode_utf8("$share/$dir");
     $dirDisplay =~ s{//+}{/}g;
     $dirDisplay =~ s{/+$}{}g;
     $dirDisplay = "/" if ( $dirDisplay eq "" );