]> git.decadent.org.uk Git - maypole.git/commitdiff
fix to request options for mp1.x
authorAaron Trevena <aaron.trevena@gmail.com>
Tue, 26 Jun 2007 12:33:21 +0000 (12:33 +0000)
committerAaron Trevena <aaron.trevena@gmail.com>
Tue, 26 Jun 2007 12:33:21 +0000 (12:33 +0000)
git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@574 48953598-375a-da11-a14b-00016c27c3ee

Changes
lib/Apache/MVC.pm
lib/Maypole.pm

diff --git a/Changes b/Changes
index adcab975e541a4eb7a22cd6222b0bd4786b9269a..8794fc22207c281c8a51af77e35148b3b9e7d427 100644 (file)
--- 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
 
 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
    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
    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 )
    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.
    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)
    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
 
    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
 
 2.111 Mon 30 April 2007
    - forked - see 2.111 changelog
 
index a79c6113f2f4a7932cb511929ed5c354adafc1de..3ea2d28479dc28d49430c893ba6b7fc18765b3ae 100644 (file)
@@ -1,6 +1,6 @@
 package Apache::MVC;
 
 package Apache::MVC;
 
-our $VERSION = '2.12';
+our $VERSION = '2.121';
 
 use strict;
 use warnings;
 
 use strict;
 use warnings;
@@ -96,9 +96,14 @@ sub get_request {
     my $request_options = $self->config->request_options || {};
     my $ar;
     if ($MODPERL2) {
     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);
 }
 
     $self->ar($ar);
 }
 
index 66bb97d6ddba69e3fd4ae3239063b317f79f0759..4954ec74cb09747c180e21972e6b65a8d27fc271 100644 (file)
@@ -12,7 +12,7 @@ use URI::QueryParam;
 use NEXT;
 use File::MMagic::XS qw(:compat);
 
 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:
 our $mmagic = File::MMagic::XS->new();
 
 # proposed privacy conventions: