|
From: Chris W. <la...@us...> - 2001-11-26 06:55:41
|
Update of /cvsroot/openinteract/OpenInteract/pkg/base_page/script
In directory usw-pr-cvs1:/tmp/cvs-serv19755/script
Modified Files:
scan_for_new.pl
Log Message:
use mime_type_file() to find the MIME type
Index: scan_for_new.pl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/base_page/script/scan_for_new.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** scan_for_new.pl 2001/11/26 06:28:18 1.1
--- scan_for_new.pl 2001/11/26 06:55:39 1.2
***************
*** 73,78 ****
my ( $R, $location, $page_info ) = @_;
my $expire_date = $NOW + "${OPT_active_days}D";
$R->page->new({ location => $location,
! mime_type => 'text/html',
title => $page_info->{title},
is_active => 'yes',
--- 73,81 ----
my ( $R, $location, $page_info ) = @_;
my $expire_date = $NOW + "${OPT_active_days}D";
+ my $full_filename = join( '/', $OPT_root, $location );
+ my $mime_type = $R->page->mime_type_file( $full_filename ) ||
+ 'text/html'
$R->page->new({ location => $location,
! mime_type => $mime_type,
title => $page_info->{title},
is_active => 'yes',
|