Update of /cvsroot/sandweb/sandweb/lib/SandWeb
In directory usw-pr-cvs1:/tmp/cvs-serv28019/lib/SandWeb
Modified Files:
Browse.pm
Log Message:
Browse object uses File object for file info now
Index: Browse.pm
===================================================================
RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -U2 -r1.23 -r1.24
--- Browse.pm 2001/12/20 02:34:46 1.23
+++ Browse.pm 2001/12/21 07:15:59 1.24
@@ -7,4 +7,5 @@
use strict;
use lib '../lib';
+
use SandWeb::File;
use HTML::Template;
@@ -119,5 +120,5 @@
$row_data{FILESIZE} = $file->get_size();
$row_data{FILEAGE} = $file->get_age();
- if (-d "$sandbox/$path/$filename") {
+ if ( $file->get_file_type() eq "Directory" ) {
if ($repo_type eq "CVS") {
next if ($filename =~ /^CVS$/);
@@ -129,18 +130,18 @@
} else {
$row_data{COLOR} = "$color1";
- }
}
- elsif (-T "$sandbox/$path/$filename") {
- $row_data{FILETYPE} = "text";
- $row_data{LINK} = "action=file&filename=$filename";
+ }
+ elsif ( $file->get_file_type() eq "Text" ) {
+ $row_data{FILETYPE} = "text";
+ $row_data{LINK} = "action=file&filename=$filename";
if ($counter eq "0") {
- $row_data{COLOR} = "$color0";
+ $row_data{COLOR} = "$color0";
} else {
- $row_data{COLOR} = "$color1";
+ $row_data{COLOR} = "$color1";
}
}
- elsif (-B "$sandbox/$path/$filename") {
- $row_data{FILETYPE} = "binary";
- $row_data{LINK} = "action=file&filename=$filename";
+ elsif ( $file->get_file_type() eq "Binary" ) {
+ $row_data{FILETYPE} = "binary";
+ $row_data{LINK} = "action=file&filename=$filename";
if ($counter eq "0") {
$row_data{COLOR} = "$color0";
|