From: Aaron Trevena Date: Sat, 24 Mar 2007 12:53:49 +0000 (+0000) Subject: applied nicg fix, to make code match pod, i.e. make the get_user and get_session... X-Git-Tag: 2.12~15 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=ef6d6cc9adeae9b32f41b1bf388fa1be5013a5c9;p=maypole.git applied nicg fix, to make code match pod, i.e. make the get_user and get_session calls do something git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@559 48953598-375a-da11-a14b-00016c27c3ee --- diff --git a/Changes b/Changes index cf75554..1433119 100644 --- a/Changes +++ b/Changes @@ -25,6 +25,7 @@ For information about current developments and future releases, see: 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 2.11 Mon 31 July 2006 diff --git a/lib/Maypole.pm b/lib/Maypole.pm index fdb1b86..c6cef44 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -184,7 +184,8 @@ __PACKAGE__->mk_classdata($_) for qw( config init_done view_object model_classes __PACKAGE__->mk_accessors( qw( params query objects model_class template_args output path args action template error document_encoding content_type table - headers_in headers_out stash status parent build_form_elements) + headers_in headers_out stash status parent build_form_elements + user session) ); __PACKAGE__->config( Maypole::Config->new() ); @@ -435,8 +436,10 @@ sub handler : method { return $self->status unless $self->status == Maypole::Constants::OK(); die "status undefined after start_request_hook()" unless defined $self->status; - $self->get_session; - $self->get_user; + + $self->session($self->get_session); + $self->user($self->get_user); + my $status = $self->handler_guts; return $status unless $status == OK; # TODO: require send_output to return a status code @@ -474,7 +477,9 @@ sub component { $self->args([]); $self->objects([]); - $self->get_user; + $self->session($self->get_session); + $self->user($self->get_user); + my $url = URI->new($path); $self->{path} = $url->path; $self->parse_path;