[interchange-cvs] interchange - racke modified 3 files

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Tue Jul 8 08:41:00 EDT 2003


User:      racke
Date:      2003-07-08 11:41:00 GMT
Modified:  .        WHATSNEW
Modified:  code/UserTag capture_page.tag
Modified:  lib/Vend Dispatch.pm
Log:
Jobs: Set $CGI->{mv_tmp_session} to signal that a "robot" is in charge.
capture_page: Call substitute_image and add expiry parameter.

Revision  Changes    Path
2.143     +7 -3      interchange/WHATSNEW


rev 2.143, prev_rev 2.142
Index: WHATSNEW
===================================================================
RCS file: /anon_cvs/repository/interchange/WHATSNEW,v
retrieving revision 2.142
retrieving revision 2.143
diff -u -r2.142 -r2.143
--- WHATSNEW	6 Jul 2003 21:26:49 -0000	2.142
+++ WHATSNEW	8 Jul 2003 11:41:00 -0000	2.143
@@ -172,9 +172,8 @@
 
   The size is still determined by Image::Size.
 
-* New Usertag [capture-page] bringing back some of the static page
-  capabilities, designed to called from Interchange jobs. The tag
-  is able to reproduce standard as well as search results pages:
+* New Usertag [capture-page] to interpolate pages and dump to disk,
+  usually called from Interchange jobs. Examples:
 
   [capture-page page=index file=static/index.html umask=022]
 
@@ -183,6 +182,11 @@
     scan="fi=products/st=db/co=yes/sf=category/se=[loop-code]" 
     auto_create_dir=1]
   [/loop]
+
+Jobs
+----
+
+* Set $CGI->{mv_tmp_session} to signal that a "robot" is in charge.
 
 SQL Parsing
 -----------



1.3       +6 -0      interchange/code/UserTag/capture_page.tag


rev 1.3, prev_rev 1.2
Index: capture_page.tag
===================================================================
RCS file: /anon_cvs/repository/interchange/code/UserTag/capture_page.tag,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- capture_page.tag	7 Jul 2003 19:38:40 -0000	1.2
+++ capture_page.tag	8 Jul 2003 11:41:00 -0000	1.3
@@ -16,7 +16,13 @@
 
 	$::Scratch->{mv_no_count} = 1;
 
+	if ($opt->{expiry}) {
+		my $stat = (stat($file))[9];		
+		return 1 if $stat > $opt->{expiry};
+	}
+
 	my $pageref = Vend::Page::display_page($page,{return => 1});
+	Vend::Interpolate::substitute_image($pageref);
 
 	return Vend::File::writefile (">$file", $pageref, 
         {auto_create_dir => $opt->{auto_create_dir},



1.23      +6 -3      interchange/lib/Vend/Dispatch.pm


rev 1.23, prev_rev 1.22
Index: Dispatch.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Dispatch.pm,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- Dispatch.pm	1 Jul 2003 10:46:32 -0000	1.22
+++ Dispatch.pm	8 Jul 2003 11:41:00 -0000	1.23
@@ -1,6 +1,6 @@
 # Vend::Dispatch - Handle Interchange page requests
 #
-# $Id: Dispatch.pm,v 1.22 2003/07/01 10:46:32 racke Exp $
+# $Id: Dispatch.pm,v 1.23 2003/07/08 11:41:00 racke Exp $
 #
 # Copyright (C) 2002-2003 Interchange Development Group
 # Copyright (C) 2002 Mike Heins <mike at perusion.net>
@@ -26,7 +26,7 @@
 package Vend::Dispatch;
 
 use vars qw($VERSION);
-$VERSION = substr(q$Revision: 1.22 $, 10);
+$VERSION = substr(q$Revision: 1.23 $, 10);
 
 use POSIX qw(strftime);
 use Vend::Util;
@@ -739,7 +739,10 @@
 
 		# initialize or autoload can create session
 		# but must handle all aspects
-		init_session() unless $Vend::Session;
+		unless ($Vend::Session) {
+			$CGI::values{mv_tmp_session} = 1;
+			init_session();
+		}
 
 		$CGI::remote_addr ||= 'none';
 		$CGI::useragent   ||= 'commandline';







More information about the interchange-cvs mailing list