X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=lib%2FBackupPC%2FCGI%2FRestoreInfo.pm;h=0f86b090d64add3d1ab732bc500e9bd4a422b7c8;hb=f41207123efc0156687d3f7994cd245a70d7de62;hp=a6937958c9c91f7e386c96106919c57960426d06;hpb=5c6a6cc4f333ce44a9df62ab828b0b9341579f7c;p=BackupPC.git diff --git a/lib/BackupPC/CGI/RestoreInfo.pm b/lib/BackupPC/CGI/RestoreInfo.pm index a693795..0f86b09 100644 --- a/lib/BackupPC/CGI/RestoreInfo.pm +++ b/lib/BackupPC/CGI/RestoreInfo.pm @@ -10,7 +10,7 @@ # Craig Barratt # # 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.0beta1, released 9 Apr 2004. +# Version 3.1.0beta0, released 3 Sep 2007. # # See http://backuppc.sourceforge.net. # @@ -38,6 +38,7 @@ package BackupPC::CGI::RestoreInfo; use strict; use BackupPC::CGI::Lib qw(:all); +use Encode qw/decode_utf8/; sub action { @@ -80,10 +81,16 @@ sub action substr($targetFile, 0, length($RestoreReq{pathHdrSrc})) = $RestoreReq{pathHdrDest}; $targetFile =~ s{//+}{/}g; + $strippedShareDest = decode_utf8($strippedShareDest); + $targetFile = decode_utf8($targetFile); + $strippedShareSrc = decode_utf8($strippedShareSrc); + $f = decode_utf8($f); $fileListStr .= <$RestoreReq{hostSrc}:/$strippedShareSrc$f$RestoreReq{hostDest}:/$strippedShareDest$targetFile EOF } + $RestoreReq{shareSrc} = decode_utf8($RestoreReq{shareSrc}); + $RestoreReq{shareDest} = decode_utf8($RestoreReq{shareDest}); my $content = eval("qq{$Lang->{Restore___num_details_for__host2}}"); Header(eval("qq{$Lang->{Restore___num_details_for__host}}"),$content); Trailer();