[interchange-cvs] interchange - racke modified
code/UserTag/capture_page.tag
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Wed Jul 9 06:40:00 EDT 2003
User: racke
Date: 2003-07-09 09:40:58 GMT
Modified: code/UserTag capture_page.tag
Log:
touch option added
Revision Changes Path
1.4 +11 -2 interchange/code/UserTag/capture_page.tag
rev 1.4, prev_rev 1.3
Index: capture_page.tag
===================================================================
RCS file: /anon_cvs/repository/interchange/code/UserTag/capture_page.tag,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- capture_page.tag 8 Jul 2003 11:41:00 -0000 1.3
+++ capture_page.tag 9 Jul 2003 09:40:58 -0000 1.4
@@ -17,8 +17,17 @@
$::Scratch->{mv_no_count} = 1;
if ($opt->{expiry}) {
- my $stat = (stat($file))[9];
- return 1 if $stat > $opt->{expiry};
+ my $stat = (stat($file))[9];
+
+ if ($stat > $opt->{expiry}) {
+ if ($opt->{touch}) {
+ my $now = time();
+ unless (utime ($now, $now, $file)) {
+ ::logError ("Error on touching file $file: $!\n");
+ }
+ }
+ return;
+ }
}
my $pageref = Vend::Page::display_page($page,{return => 1});
More information about the interchange-cvs
mailing list