From 373c588aa7b5a4f0d99a5940fade8a767c6d9426 Mon Sep 17 00:00:00 2001 From: Aaron Trevena Date: Tue, 26 Jun 2007 12:33:21 +0000 Subject: [PATCH] fix to request options for mp1.x git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@574 48953598-375a-da11-a14b-00016c27c3ee --- Changes | 41 +++++++++++++++++++++++++++-------------- lib/Apache/MVC.pm | 13 +++++++++---- lib/Maypole.pm | 2 +- 3 files changed, 37 insertions(+), 19 deletions(-) diff --git a/Changes b/Changes index adcab97..8794fc2 100644 --- a/Changes +++ b/Changes @@ -2,36 +2,49 @@ This file documents the revision history for Perl extension Maypole. For information about current developments and future releases, see: http://maypole.perl.org/?TheRoadmap -2.12 22 June 2007 +2.121 +Bug Fixes : + Apache::Request is fetched with a new object instead of instance if request options are provided + +2.12 22 June 2007 + +SVN revision 573 + +Bug Fixes : Fixed some db_colinfo test bugs Fixed typo in edit form template - Inheritence simpler and nicer and less hacked - add_model_superclass method moves @ISA munging into the model - new Class::DBI::DFV based model - new test to check everything compiles - Model inheritance re-organised - New config method : additional, for stashing additional info, especially from additional_data method - new warn method in maypole/request class/object, over-ridden by Apache::MVC, etc or own driver - AsForm fixes to stringification _to_select - new build_form_elements attribute for Maypole request and Maypole::Config, set it to 0 to avoid building cgi form if you don't need it + AsForm fixes to stringification _to_select made DFV and FromCGI warn instead of die on unexpected cgi params - added CGI params to TT error template small improvements to some factory templates fix to path handling in mod_perl and CGI when location ends in / fixed template path ordering so i.e. /tablename/list is used before /list when provided with a tablename fixed template path with array refs fix to template being reset from path in plain templates (i.e. where no model), may affect those relying on the bug ( bug 23722 ) - added search_columns method to base cdbi model class, provides display_columns unless over-ridden fix to display_line macro in factory templates (bug 22920) fix to correct problem with LocationMatch and regex based Location directives in apache config. - change to view::base to only call display_columns, stringify_columns, to_cgi if model class can - changed template path to only look for custom, factory, etc on first/only path provided fix to redirect_request Fixed typo in _do_update_or_create (bug 26495) + + +API additions and enhancements : + new Class::DBI::DFV based model + New config method : additional, for stashing additional info, especially from additional_data method + new warn method in maypole/request class/object, over-ridden by Apache::MVC, etc or own driver + new build_form_elements attribute for Maypole request and Maypole::Config, set it to 0 to avoid building cgi form if you don't need it + added CGI params to TT error template + improvements to factory templates + added search_columns method to base cdbi model class, provides display_columns unless over-ridden added new hook - preprocess_location added new attribute to Maypole::Config - request_options improved pager template macro + +Internal additions and enhancements : + Inheritence simpler and nicer and less hacked + add_model_superclass method moves @ISA munging into the model + new test to check everything compiles + Model inheritance re-organised + 2.111 Mon 30 April 2007 - forked - see 2.111 changelog diff --git a/lib/Apache/MVC.pm b/lib/Apache/MVC.pm index a79c611..3ea2d28 100644 --- a/lib/Apache/MVC.pm +++ b/lib/Apache/MVC.pm @@ -1,6 +1,6 @@ package Apache::MVC; -our $VERSION = '2.12'; +our $VERSION = '2.121'; use strict; use warnings; @@ -96,9 +96,14 @@ sub get_request { my $request_options = $self->config->request_options || {}; my $ar; if ($MODPERL2) { - $ar = eval {require Apache2::Request} ? Apache2::Request->new($r,%{$request_options}) : $r; - } - else { $ar = Apache::Request->instance($r,%{$request_options}); } + $ar = eval {require Apache2::Request} ? Apache2::Request->new($r,%{$request_options}) : $r; + } else { + if (keys %$request_options) { + $ar = Apache::Request->new($r,%{$request_options}); + } else { + $ar = Apache::Request->instance($r); + } + } $self->ar($ar); } diff --git a/lib/Maypole.pm b/lib/Maypole.pm index 66bb97d..4954ec7 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -12,7 +12,7 @@ use URI::QueryParam; use NEXT; use File::MMagic::XS qw(:compat); -our $VERSION = '2.12'; +our $VERSION = '2.121'; our $mmagic = File::MMagic::XS->new(); # proposed privacy conventions: -- 2.39.5