
interchange-cvs at icdevgroup
Apr 22, 2008, 12:00 AM
Post #1 of 1
(87 views)
Permalink
|
|
interchange - jon modified 4 files
|
|
User: jon Date: 2008-04-22 07:00:01 GMT Modified: lib/Vend Dispatch.pm Modified: dist/lib/UI ui.cfg Modified: . UPGRADE Modified: dist catalog_after.cfg Log: Make global ActionMap input consistent with catalog ActionMaps (RT #48). This will break all global ActionMaps that expect the old calling parameter of a URL with the action removed from the beginning. I've manually reviewed all of the built-in global ActionMaps, and tested some of them, and found no problems. But I won't be surprised if some problems are found. More testing is warranted. Revision Changes Path 1.99 interchange/lib/Vend/Dispatch.pm rev 1.99, prev_rev 1.98 Index: Dispatch.pm =================================================================== RCS file: /var/cvs/interchange/lib/Vend/Dispatch.pm,v retrieving revision 1.98 retrieving revision 1.99 diff -u -u -r1.98 -r1.99 --- Dispatch.pm 22 Apr 2008 05:28:54 -0000 1.98 +++ Dispatch.pm 22 Apr 2008 07:00:01 -0000 1.99 @@ -1,6 +1,6 @@ # Vend::Dispatch - Handle Interchange page requests # -# $Id: Dispatch.pm,v 1.98 2008-04-22 05:28:54 jon Exp $ +# $Id: Dispatch.pm,v 1.99 2008-04-22 07:00:01 jon Exp $ # # Copyright (C) 2002-2008 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.98 $, 10); +$VERSION = substr(q$Revision: 1.99 $, 10); use POSIX qw(strftime); use Vend::Util; @@ -1655,7 +1655,6 @@ #::logDebug("path=$Vend::FinalPath mv_action=$CGI::values{mv_action}"); DOACTION: { - my @path = split('/', $Vend::FinalPath, 2); if (defined $CGI::values{mv_action}) { $CGI::values{mv_todo} = $CGI::values{mv_action} if ! defined $CGI::values{mv_todo} @@ -1665,7 +1664,7 @@ if ! defined $CGI::values{mv_nextpage}; } else { - $Vend::Action = shift @path; + ($Vend::Action) = $Vend::FinalPath =~ m{\A([^/]*)}; } #::logGlobal("action=$Vend::Action path=$Vend::FinalPath"); @@ -1676,15 +1675,15 @@ if ! defined $CGI::values{mv_nextpage}; new Vend::Parse; } - elsif ( defined ($sub = $action{$Vend::Action}) ) { - $Vend::FinalPath = join "", @path; + else { + $sub = $action{$Vend::Action}; } #show_times("end path/action resolve") if $Global::ShowTimes; eval { if(defined $sub) { - $status = $sub->($Vend::FinalPath); + $status = $sub->($Vend::FinalPath); #show_times("end action") if $Global::ShowTimes; } else { 2.17 interchange/dist/lib/UI/ui.cfg rev 2.17, prev_rev 2.16 Index: ui.cfg =================================================================== RCS file: /var/cvs/interchange/dist/lib/UI/ui.cfg,v retrieving revision 2.16 retrieving revision 2.17 diff -u -u -r2.16 -r2.17 --- ui.cfg 1 Apr 2006 10:39:27 -0000 2.16 +++ ui.cfg 22 Apr 2008 07:00:01 -0000 2.17 @@ -149,6 +149,8 @@ sub { require HTML::HeadParser; my $path = shift; + # strip action from beginning of path + $path =~ s{\A[^/]+/}{}; #::logDebug("Path is $path"); use vars qw/ 2.27 interchange/UPGRADE rev 2.27, prev_rev 2.26 Index: UPGRADE =================================================================== RCS file: /var/cvs/interchange/UPGRADE,v retrieving revision 2.26 retrieving revision 2.27 diff -u -u -r2.26 -r2.27 --- UPGRADE 22 Apr 2008 05:18:56 -0000 2.26 +++ UPGRADE 22 Apr 2008 07:00:01 -0000 2.27 @@ -4,14 +4,13 @@ Interchange is designed to be drop-in compatible in its major version. - - 5.6.x -- A number of incompatible changes were made. Most of them will be - simple to deal with, but please consult the list below in the - "Known Issues" section. +Briefly summarized, here's what you can expect when upgrading from the +following versions: 5.4.x -- A number of incompatible changes were made. Most of them will be simple to deal with, but please consult the list below in the - "Known Issues" section. + "Known Issues" section. Your code will almost certainly fail to + work properly until you make the necessary changes described! 5.2.x -- There should be few to no compatibility issues in upgrading from Interchange 5.2.x. @@ -81,6 +80,10 @@ UserTrack now defaults to "no", so if you want the X-Track HTTP response header to be output, add "UserTrack yes" to your catalog.cfg. +UserTrack also no longer affects TrackFile, so if you don't want TrackFile +output, you should not have a TrackFile directive in catalog.cfg. + + KNOWN ISSUES UPGRADING FROM 5.4.x Check the "special_pages/missing.html" file, in all of your Interchange-driven @@ -106,9 +109,24 @@ #ifdef, #include, etc., as was done in the past. Bare ifdef, include, etc. must now be used. -Removed RequiredFields, HTMLmirror and UseCode directives. +Global ActionMaps: Previously, the path passed to a global ActionMap +did not include the action itself, but the path passed to a catalog +ActionMap did include the action. This discrepancy was annoying to keep +track of. Now both kinds of ActionMaps receive a path that includes +the action. This means that all global ActionMap code will need to be +updated to deal with the action. Most simply, you can strip off the +action at the beginning of the sub something like this: + + ActionMap your_action <<EOR + sub { + my ($path) = @_; + # remove action + $path =~ s:^[^/]+/::; + # your code here + } + EOR -Removed unused SOAP_Host directive. +Removed SOAP_Host, RequiredFields, HTMLmirror and UseCode directives. All previously deprecated configuration directives have been removed. @@ -144,8 +162,10 @@ The session per IP counters have been changed to the new "timecard" round-robin style counters. You will need to delete the old counter files from the tmp/addr_ctr directory with a command similar to the following: + rm -rf catroot/tmp/addr_ctr/* -...be careful with the above command, if mistyped it can seriously mess up + +...be careful with the above command. If mistyped it can seriously mess up your filesystem. The [error] and [formel] tags now make use of the following CSS class, 2.3 interchange/dist/catalog_after.cfg rev 2.3, prev_rev 2.2 Index: catalog_after.cfg =================================================================== RCS file: /var/cvs/interchange/dist/catalog_after.cfg,v retrieving revision 2.2 retrieving revision 2.3 diff -u -u -r2.2 -r2.3 --- catalog_after.cfg 7 Jan 2003 19:57:31 -0000 2.2 +++ catalog_after.cfg 22 Apr 2008 07:00:01 -0000 2.3 @@ -57,7 +57,6 @@ ActionMap ui_download <<EOR sub { - my $deliverable = shift; my $status; $CGI->{mv_nextpage} =~ s:^ui_download/::; $CGI->{mv_nextpage} .= $Session->{extension}; _______________________________________________ interchange-cvs mailing list interchange-cvs[at]icdevgroup.org http://www.icdevgroup.org/mailman/listinfo/interchange-cvs
|