projects
/
BackupPC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added only_increment param to all action=browse links
[BackupPC.git]
/
lib
/
BackupPC
/
CGI
/
Browse.pm
diff --git
a/lib/BackupPC/CGI/Browse.pm
b/lib/BackupPC/CGI/Browse.pm
index
2bbdeda
..
aa52543
100644
(file)
--- a/
lib/BackupPC/CGI/Browse.pm
+++ b/
lib/BackupPC/CGI/Browse.pm
@@
-10,7
+10,7
@@
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2003-200
7
Craig Barratt
+# Copyright (C) 2003-200
9
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
#
# 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 3.
1.0beta0, released 3 Sep 2007
.
+# Version 3.
2.0, released 31 Jul 2010
.
#
# See http://backuppc.sourceforge.net.
#
#
# See http://backuppc.sourceforge.net.
#
@@
-80,7
+80,7
@@
sub action
my $backupTime = timeStamp2($Backups[$i]{startTime});
my $backupAge = sprintf("%.1f", (time - $Backups[$i]{startTime})
/ (24 * 3600));
my $backupTime = timeStamp2($Backups[$i]{startTime});
my $backupAge = sprintf("%.1f", (time - $Backups[$i]{startTime})
/ (24 * 3600));
- my $view = BackupPC::View->new($bpc, $host, \@Backups, {nlink => 1});
+ my $view = BackupPC::View->new($bpc, $host, \@Backups, {nlink => 1
, only_increment => $In{only_increment}
});
if ( $dir eq "" || $dir eq "." || $dir eq ".." ) {
$attr = $view->dirAttrib($num, "", "");
if ( $dir eq "" || $dir eq "." || $dir eq ".." ) {
$attr = $view->dirAttrib($num, "", "");
@@
-162,7
+162,7
@@
sub action
push(@DirStr, {needTick => 1,
tdArgs => " class=\"$tdStyle\"",
link => <<EOF});
push(@DirStr, {needTick => 1,
tdArgs => " class=\"$tdStyle\"",
link => <<EOF});
-<a href="$MyURL?action=browse&host=${EscURI($host)}&num=$num&share=$shareURI&dir=$path
">$imgStr</a><a href="$MyURL?action=browse&host=${EscURI($host)}&num=$num&share=$shareURI&dir=$path
" class="$linkStyle"> $dirName</a></td></tr>
+<a href="$MyURL?action=browse&host=${EscURI($host)}&num=$num&share=$shareURI&dir=$path
&only_increment=$In{only_increment}">$imgStr</a><a href="$MyURL?action=browse&host=${EscURI($host)}&num=$num&share=$shareURI&dir=$path&only_increment=$In{only_increment}
" class="$linkStyle"> $dirName</a></td></tr>
EOF
$fileCnt++;
$gotDir = 1;
EOF
$fileCnt++;
$gotDir = 1;
@@
-222,7
+222,7
@@
EOF
if ( $gotDir ) {
$fileStr .= <<EOF;
<tr><td class="fviewborder">
if ( $gotDir ) {
$fileStr .= <<EOF;
<tr><td class="fviewborder">
- <input type="checkbox" name="fcb$checkBoxCnt" value="$path"> $iconStr <a href="$MyURL?action=browse&host=${EscURI($host)}&num=$num&share=$shareURI&dir=$path">$fDisp</a>
+ <input type="checkbox" name="fcb$checkBoxCnt" value="$path"> $iconStr <a href="$MyURL?action=browse&host=${EscURI($host)}&num=$num&share=$shareURI&dir=$path
&only_increment=$In{only_increment}
">$fDisp</a>
</td>
$attrStr
</tr>
</td>
$attrStr
</tr>
@@
-297,10
+297,14
@@
EOF
my $showDate = timeStamp2($Backups[$i]{startTime});
my $backupNum = $Backups[$i]{num};
$selected = " selected" if ( $backupNum == $num );
my $showDate = timeStamp2($Backups[$i]{startTime});
my $backupNum = $Backups[$i]{num};
$selected = " selected" if ( $backupNum == $num );
- $otherDirs .= "<option value=\"$MyURL?action=browse&host=${EscURI($host)}&num=$backupNum&share=$shareURI&dir=$pathURI\"$selected>#$backupNum - ($showDate)</option>\n";
+ $otherDirs .= "<option value=\"$MyURL?action=browse&host=${EscURI($host)}&num=$backupNum&share=$shareURI&dir=$pathURI
&only_increment=$In{only_increment}
\"$selected>#$backupNum - ($showDate)</option>\n";
}
$filledBackup .= eval("qq{$Lang->{Visit_this_directory_in_backup}}");
}
}
$filledBackup .= eval("qq{$Lang->{Visit_this_directory_in_backup}}");
}
+
+ # XXX ASA
+ $filledBackup .= "<li><input type=checkbox name=only_increment value=checked $In{only_increment}> show only this increment";
+
$dir = decode_utf8($dir);
$share = decode_utf8($share);
my $content = eval("qq{$Lang->{Backup_browse_for__host}}");
$dir = decode_utf8($dir);
$share = decode_utf8($share);
my $content = eval("qq{$Lang->{Backup_browse_for__host}}");