You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(381) |
Nov
(176) |
Dec
(310) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(334) |
Feb
(96) |
Mar
(149) |
Apr
(214) |
May
(120) |
Jun
(56) |
Jul
(10) |
Aug
(273) |
Sep
(182) |
Oct
(56) |
Nov
(125) |
Dec
(22) |
2003 |
Jan
(63) |
Feb
(181) |
Mar
(498) |
Apr
(433) |
May
(39) |
Jun
(512) |
Jul
(276) |
Aug
(156) |
Sep
(101) |
Oct
(66) |
Nov
(24) |
Dec
(161) |
2004 |
Jan
(1) |
Feb
(377) |
Mar
(68) |
Apr
(26) |
May
(107) |
Jun
(333) |
Jul
(13) |
Aug
|
Sep
(76) |
Oct
(88) |
Nov
(170) |
Dec
(91) |
2005 |
Jan
(52) |
Feb
(239) |
Mar
(402) |
Apr
(15) |
May
(2) |
Jun
(1) |
Jul
(13) |
Aug
|
Sep
(71) |
Oct
(34) |
Nov
|
Dec
|
2006 |
Jan
(5) |
Feb
(5) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(7) |
Oct
(2) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From:
<a_...@us...> - 2007-03-09 03:52:45
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/ContentGenerator In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6239 Modified Files: TT2Process.pm TemplateSource.pm Log Message: Allow template processing through OI2 interfaces even when no request or controller is present Index: TT2Process.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/ContentGenerator/TT2Process.pm,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** TT2Process.pm 23 May 2005 10:21:04 -0000 1.22 --- TT2Process.pm 9 Mar 2007 03:52:41 -0000 1.23 *************** *** 72,80 **** # available: ! my $lh = CTX->request->language_handle; ! $template_vars->{MSG} = sub { ! return ( $lh ) ? $lh->maketext( @_ ) : "$_[0]: no language handle"; ! }; ! $template_vars->{LH} = $lh; $self->_customize_template_variables( $template_name, $template_vars ); --- 72,85 ---- # available: ! if ( CTX->request ) { ! my $lh = CTX->request->language_handle; ! $template_vars->{MSG} = sub { ! return ( $lh ) ? $lh->maketext( @_ ) : "$_[0]: no language handle"; ! }; ! $template_vars->{LH} = $lh; ! } ! else { ! $template_vars->{MSG} = sub { return "$_[0]: no language handle" }; ! } $self->_customize_template_variables( $template_name, $template_vars ); Index: TemplateSource.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/ContentGenerator/TemplateSource.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** TemplateSource.pm 17 Mar 2005 14:58:01 -0000 1.15 --- TemplateSource.pm 9 Mar 2007 03:52:41 -0000 1.16 *************** *** 88,92 **** } ! if ( $name and CTX->controller->can( 'add_template_used' ) ) { CTX->controller->add_template_used( $name ); } --- 88,92 ---- } ! if ( $name and CTX->controller and CTX->controller->can( 'add_template_used' ) ) { CTX->controller->add_template_used( $name ); } |
From:
<a_...@us...> - 2006-10-01 04:09:18
|
Update of /cvsroot/openinteract/OpenInteract2/eg/conf In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1550/eg/conf Modified Files: server.ini Log Message: Changed documentation not to guide user to writing "undef" in the server ini when an empty value is wanted for session expiration. "undef" is parsed as the string "undef" and results in a malformed cookie being sent if used as session expiration. This causes some problems at least with IE browsers. Index: server.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/eg/conf/server.ini,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** server.ini 20 Feb 2003 12:28:14 -0000 1.2 --- server.ini 1 Oct 2006 04:09:14 -0000 1.3 *************** *** 162,166 **** # # Note that you can also set the expiration for the session ! # cookie -- if you set it to be 'undef' the cookie will be # 'short-lived', meaning it will expire when the user shuts # down the browser. Otherwise, pass something like the --- 162,166 ---- # # Note that you can also set the expiration for the session ! # cookie -- if you set it to be an empty string the cookie will be # 'short-lived', meaning it will expire when the user shuts # down the browser. Otherwise, pass something like the |
From:
<a_...@us...> - 2006-10-01 04:09:18
|
Update of /cvsroot/openinteract/OpenInteract2/sample/website/conf In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1550/sample/website/conf Modified Files: server.ini Log Message: Changed documentation not to guide user to writing "undef" in the server ini when an empty value is wanted for session expiration. "undef" is parsed as the string "undef" and results in a malformed cookie being sent if used as session expiration. This causes some problems at least with IE browsers. Index: server.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/website/conf/server.ini,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** server.ini 30 Jul 2005 22:43:43 -0000 1.56 --- server.ini 1 Oct 2006 04:09:13 -0000 1.57 *************** *** 190,194 **** # # Note that you can also set the expiration for the session ! # cookie -- if you set it to be 'undef' the cookie will be # 'short-lived', meaning it will expire when the user shuts # down the browser. Otherwise, pass something like the --- 190,194 ---- # # Note that you can also set the expiration for the session ! # cookie -- if you set it to be an empty string the cookie will be # 'short-lived', meaning it will expire when the user shuts # down the browser. Otherwise, pass something like the |
From:
<a_...@us...> - 2006-09-30 02:03:55
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11840/pkg/base Modified Files: package.ini Log Message: hashref sessions are now stored as sessions using the configured implementation class (and thus saved at all). Sessionmanager has a method for removing session from the datastore and removing the keys from it so that a new session object is not created at the end of the response with the same data. Logout now uses this method. Index: package.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base/package.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** package.ini 19 Oct 2005 03:03:00 -0000 1.4 --- package.ini 30 Sep 2006 02:03:47 -0000 1.5 *************** *** 1,5 **** [package] name = base ! version = 2.50 author = Chris Winters (ch...@cw...) url = http://www.openinteract.org/ --- 1,5 ---- [package] name = base ! version = 2.51 author = Chris Winters (ch...@cw...) url = http://www.openinteract.org/ |
From:
<a_...@us...> - 2006-09-30 02:03:50
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base/OpenInteract2/Action In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11840/pkg/base/OpenInteract2/Action Modified Files: Logout.pm Log Message: hashref sessions are now stored as sessions using the configured implementation class (and thus saved at all). Sessionmanager has a method for removing session from the datastore and removing the keys from it so that a new session object is not created at the end of the response with the same data. Logout now uses this method. Index: Logout.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base/OpenInteract2/Action/Logout.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Logout.pm 19 Mar 2004 05:42:22 -0000 1.5 --- Logout.pm 30 Sep 2006 02:03:47 -0000 1.6 *************** *** 16,19 **** --- 16,20 ---- my $request = CTX->request; $request->auth_clear; + OpenInteract2::SessionManager->delete_session( $request->session ); my $redirect_info = CTX->lookup_redirect_config; if ( my $url = $request->param( 'return_to' ) ) { |
From:
<a_...@us...> - 2006-09-30 02:03:50
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11840/lib/OpenInteract2 Modified Files: SessionManager.pm Response.pm Log Message: hashref sessions are now stored as sessions using the configured implementation class (and thus saved at all). Sessionmanager has a method for removing session from the datastore and removing the keys from it so that a new session object is not created at the end of the response with the same data. Logout now uses this method. Index: SessionManager.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/SessionManager.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** SessionManager.pm 25 Jan 2006 11:55:51 -0000 1.10 --- SessionManager.pm 30 Sep 2006 02:03:46 -0000 1.11 *************** *** 31,34 **** --- 31,36 ---- $log->warn( "Error fetching session with ID '$session_id': $@\n", "Continuing..." ); + # This cookie expire is overridden if the returned "session hash" + # gets values and a new session cookie is created from it. OpenInteract2::Cookie->expire( SESSION_COOKIE ); return {}; *************** *** 45,54 **** $log->is_info && $log->info( "Session is expired; clearing out." ); ! eval { tied( %{ $session } )->delete() }; ! if ( $@ ) { ! $log->warn( "Caught error trying to remove expired session: $@\n", ! "Continuing without problem since this just means", ! "you'll have a stale session in your datastore" ); ! } return {}; } --- 47,51 ---- $log->is_info && $log->info( "Session is expired; clearing out." ); ! $class->delete_session( $session ); return {}; } *************** *** 61,64 **** --- 58,83 ---- + sub delete_session { + my ( $class, $session ) = @_; + + return 0 if ! ref $session; + if ( tied( %{ $session } ) ) { + eval { tied( %{ $session } )->delete() }; + if ( $@ ) { + $log->warn( + "Caught error trying to remove session: $@\n", + "Continuing without problem since this just means", + "you'll have a stale session in your datastore" + ); + } + untie %{ $session }; + } + + delete $session->{ $_ } for keys %{ $session }; + + return 1; + } + + sub is_session_valid { my ( $class, $session ) = @_; *************** *** 125,129 **** $log->is_debug && $log->debug( "Tied session, no useful info; removing..." ); ! tied( %{ $session } )->delete(); } } --- 144,148 ---- $log->is_debug && $log->debug( "Tied session, no useful info; removing..." ); ! $class->delete_session( $session ); } } *************** *** 138,147 **** $log->is_info && $log->info( "Create new session with data from hashref using ", ! "keys: ", keys %{ $session } ); my $new_session = $class->create; if ( $new_session ) { foreach my $key ( keys %{ $session } ) { $new_session->{ $key } = $session->{ $key }; } $class->_save_session( $new_session, 1 ); } --- 157,168 ---- $log->is_info && $log->info( "Create new session with data from hashref using ", ! "keys: ", join (', ', keys %{ $session } ) ); my $new_session = $class->create; if ( $new_session ) { foreach my $key ( keys %{ $session } ) { + next if $key eq '_session_id'; $new_session->{ $key } = $session->{ $key }; } + delete $new_session->{is_new}; $class->_save_session( $new_session, 1 ); } *************** *** 249,253 **** # Saving a session is done in OpenInteract2::Response ! OpenInteract2::SessionManager->save( CTX->request->session ); =head1 DESCRIPTION --- 270,282 ---- # Saving a session is done in OpenInteract2::Response ! my $session_class = CTX->lookup_session_config->{class}; ! $session_class->save( CTX->request->session ); ! ! # When logging out, in addition to clearing the session cookie, ! # you might want to remove the session from the datastore: ! ! OpenInteract2::SessionManager->delete_session( ! CTX->request->session ! ); =head1 DESCRIPTION *************** *** 257,262 **** L<Apache::Session|Apache::Session> to do the heavy-lifting for us. ! This handler has two public methods: C<create()> and C<save()>. Guess ! in which order they are meant to be called? This class also requires you to implement a subclass that overrides --- 286,294 ---- L<Apache::Session|Apache::Session> to do the heavy-lifting for us. ! This handler has two main public methods: C<create()> and C<save()>. ! Create is used to create session objects (both old ones using stored ! data and new ones with no data). ! Save is used to make sure that the given data is stored in a session ! object and the object id is set in a session cookie. This class also requires you to implement a subclass that overrides *************** *** 291,298 **** hashref if not. ! B<save()> ! Persist (create or update) the session for later. If the 'is_new' key ! was set in the session by the C<create()> method we also use L<OpenInteract2::Cookie|OpenInteract2::Cookie> to create a new cookie and put it in the response. The expiration for the generated cookie is --- 323,334 ---- hashref if not. ! B<save( $session object | $hashref of values )> ! Persist (create or update) the session data for later. If a hashref is ! given, a new session object is created with the given data and a ! random session id. ! ! If the 'is_new' key was set in the session by the C<create()> method ! or a new object was created from a hashref we also use L<OpenInteract2::Cookie|OpenInteract2::Cookie> to create a new cookie and put it in the response. The expiration for the generated cookie is *************** *** 305,308 **** --- 341,349 ---- This method will not serialize the session if it is empty. + B<delete_session( $session object | $hashref of values )> + + Deletes the data tied to the session object, unties the object + and removes all keys from the remaining hashref. + =head1 CONFIGURATION Index: Response.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Response.pm,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Response.pm 21 Sep 2005 04:09:20 -0000 1.29 --- Response.pm 30 Sep 2006 02:03:46 -0000 1.30 *************** *** 160,164 **** sub save_session { my ( $self ) = @_; ! OpenInteract2::SessionManager->save( CTX->request->session ); } --- 160,165 ---- sub save_session { my ( $self ) = @_; ! my $session_class = CTX->lookup_session_config->{class}; ! $session_class->save( CTX->request->session ); } |
From:
<a_...@us...> - 2006-09-30 01:39:48
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/SessionManager In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2546/lib/OpenInteract2/SessionManager Modified Files: DBI.pm SQLite.pm Log Message: removed undef catenation warnings Index: DBI.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/SessionManager/DBI.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DBI.pm 18 Mar 2005 04:09:51 -0000 1.5 --- DBI.pm 30 Sep 2006 01:39:43 -0000 1.6 *************** *** 16,19 **** --- 16,20 ---- sub _create_session { my ( $class, $session_config, $session_id ) = @_; + $session_id = '' unless ( defined $session_id ); $log ||= get_logger( LOG_SESSION ); Index: SQLite.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/SessionManager/SQLite.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SQLite.pm 18 Mar 2005 04:09:51 -0000 1.5 --- SQLite.pm 30 Sep 2006 01:39:43 -0000 1.6 *************** *** 16,19 **** --- 16,20 ---- sub _create_session { my ( $class, $session_config, $session_id ) = @_; + $session_id = '' unless ( defined $session_id ); $log ||= get_logger( LOG_SESSION ); |
From:
<a_...@us...> - 2006-09-25 15:33:24
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17728/lib/OpenInteract2 Modified Files: Context.pm Log Message: Info insteasd of Error when lookup_action fails Index: Context.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Context.pm,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** Context.pm 24 Sep 2005 19:30:29 -0000 1.90 --- Context.pm 25 Sep 2006 15:33:19 -0000 1.91 *************** *** 356,360 **** unless ( $action_info ) { my $msg = "Action '$action_name' not found in action table" ; ! $log_act->error( $msg ); OpenInteract2::Exception->throw( $msg ); } --- 356,360 ---- unless ( $action_info ) { my $msg = "Action '$action_name' not found in action table" ; ! $log_act->info( $msg ); OpenInteract2::Exception->throw( $msg ); } |
From:
<a_...@us...> - 2006-09-25 13:40:01
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8012/lib/OpenInteract2 Modified Files: Action.pm Log Message: Made possible to override task error handling Index: Action.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Action.pm,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** Action.pm 21 Sep 2005 04:16:12 -0000 1.76 --- Action.pm 25 Sep 2006 13:39:48 -0000 1.77 *************** *** 292,297 **** my $content = eval { $self->$method_ref }; if ( $@ ) { ! $log->warn( "Caught error from task $item_desc: $@" ); ! $content = $@; } else { --- 292,296 ---- my $content = eval { $self->$method_ref }; if ( $@ ) { ! $content = $self->_task_error_content( $@, $item_desc ); } else { *************** *** 317,320 **** --- 316,328 ---- } + sub _task_error_content { + my ($self, $error, $item_desc) = @_; + $log ||= get_logger( LOG_ACTION ); + + $log->warn( "Caught error from task $item_desc: $error" ); + + return $error; + } + sub forward { |
From:
<a_...@us...> - 2006-09-05 20:16:41
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32260 Modified Files: URL.pm Log Message: added "!" in the list of non-escaped url characters according rfc 2396. Is there a reason why the whole escaping is not done using URI::Escape ? Index: URL.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/URL.pm,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** URL.pm 21 Sep 2005 04:10:09 -0000 1.32 --- URL.pm 5 Sep 2006 20:16:31 -0000 1.33 *************** *** 200,204 **** my ( $to_encode ) = shift; return undef unless defined( $to_encode ); ! $to_encode =~ s/([^a-zA-Z0-9_~\.\-\*\'\(\)\/\s])/uc sprintf("%%%02x",ord($1))/eg; $to_encode =~ s/\s/%20/g; return $to_encode; --- 200,205 ---- my ( $to_encode ) = shift; return undef unless defined( $to_encode ); ! # Why is this not done using URI::Escape ? ! $to_encode =~ s/([^a-zA-Z0-9_~\.\-\*\!\'\(\)\/\s])/uc sprintf("%%%02x",ord($1))/eg; $to_encode =~ s/\s/%20/g; return $to_encode; |
From: Teemu A. <in...@us...> - 2006-08-18 02:15:47
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Request In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26299 Modified Files: Apache.pm Log Message: get_server_port() is more reliable. Index: Apache.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Request/Apache.pm,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Apache.pm 18 Aug 2006 00:25:28 -0000 1.20 --- Apache.pm 18 Aug 2006 02:15:41 -0000 1.21 *************** *** 87,93 **** $self->language_header( $head_in->{'Accept-Language'} ); ! my $uri = $self->apache->parsed_uri; ! $self->server_name( $uri->hostname ); ! $self->server_port( $uri->port ); $self->remote_host( $self->apache->connection->remote_ip ); --- 87,92 ---- $self->language_header( $head_in->{'Accept-Language'} ); ! $self->server_name( $self->apache->hostname ); ! $self->server_port( $self->apache->get_server_port ); $self->remote_host( $self->apache->connection->remote_ip ); |
From: Teemu A. <in...@us...> - 2006-08-18 00:25:31
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Request In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14928/Request Modified Files: Apache.pm Apache2.pm CGI.pm LWP.pm Standalone.pm Log Message: Implemented post_body(). This is necessary for all special requests like XML-RPC and SOAP to retrieve the request content. Also implemented server_port(). This is useful for example to construct complete absolute URLs. Index: Apache.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Request/Apache.pm,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Apache.pm 17 Mar 2006 20:58:19 -0000 1.19 --- Apache.pm 18 Aug 2006 00:25:28 -0000 1.20 *************** *** 18,22 **** my @FIELDS = qw( apache ); ! OpenInteract2::Request::Apache->mk_accessors( @FIELDS ); sub init { --- 18,22 ---- my @FIELDS = qw( apache ); ! __PACKAGE__->mk_accessors( @FIELDS ); sub init { *************** *** 87,91 **** $self->language_header( $head_in->{'Accept-Language'} ); ! $self->server_name( $self->apache->hostname ); $self->remote_host( $self->apache->connection->remote_ip ); $self->forwarded_for( $self->apache->headers_in->{'X-Forwarded-For'} ); --- 87,94 ---- $self->language_header( $head_in->{'Accept-Language'} ); ! my $uri = $self->apache->parsed_uri; ! $self->server_name( $uri->hostname ); ! $self->server_port( $uri->port ); ! $self->remote_host( $self->apache->connection->remote_ip ); $self->forwarded_for( $self->apache->headers_in->{'X-Forwarded-For'} ); *************** *** 96,99 **** --- 99,110 ---- } + sub post_body { + my ( $self ) = @_; + my ( $body, $buf ); + while ( $self->apache->read( $buf, $self->apache->header_in('Content-length') ) ) { + $body .= $buf; + } + return $body; + } 1; Index: Apache2.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Request/Apache2.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Apache2.pm 6 Apr 2005 20:54:31 -0000 1.4 --- Apache2.pm 18 Aug 2006 00:25:28 -0000 1.5 *************** *** 16,20 **** my @FIELDS = qw( apache ); ! OpenInteract2::Request::Apache2->mk_accessors( @FIELDS ); my ( $done ); --- 16,20 ---- my @FIELDS = qw( apache ); ! __PACKAGE__->mk_accessors( @FIELDS ); my ( $done ); *************** *** 67,70 **** --- 67,71 ---- $self->server_name( $r->get_server_name ); + $self->server_port( $r->get_server_port ); $self->remote_host( $r->connection->remote_addr->ip_get ); $self->forwarded_for( $r->headers_in->get('X-Forwarded-For') ); *************** *** 153,156 **** --- 154,165 ---- } + sub post_body { + my ( $self ) = @_; + my ( $body, $buf ); + while ( $self->apache->read( $buf, $self->apache->header_in('Content-length') ) ) { + $body .= $buf; + } + return $body; + } 1; Index: CGI.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Request/CGI.pm,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** CGI.pm 22 Oct 2005 21:53:26 -0000 1.25 --- CGI.pm 18 Aug 2006 00:25:28 -0000 1.26 *************** *** 17,21 **** my @FIELDS = qw( cgi ); ! OpenInteract2::Request::CGI->mk_accessors( @FIELDS ); sub init { --- 17,21 ---- my @FIELDS = qw( cgi ); ! __PACKAGE__->mk_accessors( @FIELDS ); sub init { *************** *** 61,64 **** --- 61,65 ---- $self->server_name( $cgi->server_name ); + $self->server_port( $cgi->server_port ); $self->remote_host( $cgi->remote_host ); $self->forwarded_for( $ENV{'X-Forwarded-For'} ); *************** *** 125,128 **** --- 126,134 ---- } + sub post_body { + my ( $self ) = @_; + return $self->cgi->param( 'POSTDATA' ); + } + 1; Index: LWP.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Request/LWP.pm,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** LWP.pm 6 Apr 2005 20:54:31 -0000 1.23 --- LWP.pm 18 Aug 2006 00:25:28 -0000 1.24 *************** *** 19,23 **** my @FIELDS = qw( lwp ); ! OpenInteract2::Request::LWP->mk_accessors( @FIELDS ); sub init { --- 19,23 ---- my @FIELDS = qw( lwp ); ! __PACKAGE__->mk_accessors( @FIELDS ); sub init { *************** *** 160,163 **** --- 160,168 ---- } + sub post_body { + my ( $self ) = @_; + return $self->lwp->content; + } + 1; Index: Standalone.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Request/Standalone.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Standalone.pm 6 Apr 2005 20:54:31 -0000 1.15 --- Standalone.pm 18 Aug 2006 00:25:28 -0000 1.16 *************** *** 17,20 **** --- 17,23 ---- my ( $log ); + my @FIELDS = qw( props ); + __PACKAGE__->mk_accessors( @FIELDS ); + sub init { my ( $self, $props ) = @_; *************** *** 57,60 **** --- 60,64 ---- $self->server_name( $props->{server_name} ); + $self->server_port( $props->{server_port} ); $self->remote_host( $props->{remote_host} ); $self->forwarded_for( $props->{forwarded_for} ); *************** *** 78,81 **** --- 82,87 ---- $log->debug( "Set uploads ok ($num_upload)" ); + $self->props( $props ); + $log->is_info && $log->info( "Finished creating Standalone request" ); *************** *** 134,137 **** --- 140,148 ---- } + sub post_body { + my ( $self ) = @_; + return $self->props->{content}; + } + 1; *************** *** 164,167 **** --- 175,179 ---- screenshot => OpenInteract2::Upload->new( ... ) }, languages => [ 'en-UK', 'en-US', 'de', 'fr' ], + content => '<?xml version="1.0"?>' ); *************** *** 236,239 **** --- 248,258 ---- Default: none + =item * + + B<content> - Set to the POST content. This is useful if you simulate + for example a XML call. + + Default: none + =back |
From: Teemu A. <in...@us...> - 2006-08-18 00:25:31
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14928 Modified Files: Request.pm Log Message: Implemented post_body(). This is necessary for all special requests like XML-RPC and SOAP to retrieve the request content. Also implemented server_port(). This is useful for example to construct complete absolute URLs. Index: Request.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Request.pm,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** Request.pm 6 Apr 2005 20:54:30 -0000 1.58 --- Request.pm 18 Aug 2006 00:25:27 -0000 1.59 *************** *** 24,29 **** my %FIELDS = map { $_ => 1 } qw( ! now server_name remote_host ! user_agent referer cookie_header language_header url_absolute url_relative url_initial forwarded_for session auth_user auth_group auth_is_admin auth_is_logged_in --- 24,29 ---- my %FIELDS = map { $_ => 1 } qw( ! now server_name server_port remote_host ! user_agent referer cookie_header language_header post_body url_absolute url_relative url_initial forwarded_for session auth_user auth_group auth_is_admin auth_is_logged_in *************** *** 471,474 **** --- 471,476 ---- sub init { oi_error 'Subclass must implement init()' } + sub post_body { oi_error 'Subclass must implement post_body()' } + 1; *************** *** 804,807 **** --- 806,813 ---- Hostname of our server. + B<server_port> + + Port of our server. + B<remote_host> *************** *** 823,826 **** --- 829,837 ---- URL (string) where the user came from. (May be empty, forged, etc.) + B<post_body> + + POST body content in the request. This can be used to retrieve for example + SOAP or XML-RPC requests. + =head2 Action Messages |
From: Teemu A. <in...@us...> - 2006-03-17 20:58:26
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Request In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4265 Modified Files: Apache.pm Log Message: Changed server->server_name to apache->hostname. It is equal to Request/CGI implementation and atually the same as the user requests, not what reads in the server configuration. Index: Apache.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Request/Apache.pm,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Apache.pm 6 Apr 2005 20:54:31 -0000 1.18 --- Apache.pm 17 Mar 2006 20:58:19 -0000 1.19 *************** *** 87,92 **** $self->language_header( $head_in->{'Accept-Language'} ); ! my $srv = $self->apache->server; ! $self->server_name( $srv->server_hostname ); $self->remote_host( $self->apache->connection->remote_ip ); $self->forwarded_for( $self->apache->headers_in->{'X-Forwarded-For'} ); --- 87,91 ---- $self->language_header( $head_in->{'Accept-Language'} ); ! $self->server_name( $self->apache->hostname ); $self->remote_host( $self->apache->connection->remote_ip ); $self->forwarded_for( $self->apache->headers_in->{'X-Forwarded-For'} ); |
From: Teemu A. <in...@us...> - 2006-03-11 13:30:49
|
Update of /cvsroot/openinteract/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7109 Modified Files: Makefile.PL Build.PL Log Message: Added HTML::TagCloud as dependency Index: Makefile.PL =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/Makefile.PL,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Makefile.PL 30 Mar 2005 00:15:27 -0000 1.32 --- Makefile.PL 11 Mar 2006 13:30:39 -0000 1.33 *************** *** 34,37 **** --- 34,38 ---- 'Getopt::Long' => 2.32, 'HTML::Entities' => 1.13, + 'HTML::TagCloud' => 0, 'Lingua::Stem' => 0.50, 'Locale::Maketext' => 1.06, Index: Build.PL =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/Build.PL,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Build.PL 8 Feb 2005 01:54:50 -0000 1.23 --- Build.PL 11 Mar 2006 13:30:39 -0000 1.24 *************** *** 33,36 **** --- 33,37 ---- 'Getopt::Long' => 2.32, 'HTML::Entities' => 1.13, + 'HTML::TagCloud' => 0, 'Lingua::Stem' => 0.50, 'Locale::Maketext' => 1.06, |
From: <a_...@us...> - 2006-02-03 03:12:48
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17916 Modified Files: CleanExpiredSessions.pm Log Message: fixed clean_sessions validate_param Index: CleanExpiredSessions.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage/Website/CleanExpiredSessions.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CleanExpiredSessions.pm 18 Mar 2005 04:09:50 -0000 1.5 --- CleanExpiredSessions.pm 3 Feb 2006 03:12:36 -0000 1.6 *************** *** 54,57 **** --- 54,58 ---- $self->param( expire_time => $days ); } + return undef; } |
From: <a_...@us...> - 2006-02-01 22:02:50
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Controller In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17814/lib/OpenInteract2/Controller Modified Files: MainTemplate.pm Log Message: Stop controller execution after action if is_redirect. Also put action error handling in a separate function so that it can be overridden. Index: MainTemplate.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Controller/MainTemplate.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** MainTemplate.pm 22 Sep 2005 03:59:31 -0000 1.12 --- MainTemplate.pm 1 Feb 2006 22:02:38 -0000 1.13 *************** *** 46,60 **** my $content = eval { $action->execute }; - if ( $@ ) { - my $error = $@; - $log->error( "Caught exception from action: $error" ); - $content = $error; ! # TODO: Set this error message from config file ! $self->add_content_param( title => 'Action execution error' ); } # If an action set a file to send back, we're done - if ( my $send_file = CTX->response->send_file ) { $log->is_info && --- 46,61 ---- my $content = eval { $action->execute }; ! # If action died, check what to do depending on the error ! $content = $self->_action_error_content( $@ ) if $@; ! ! # If an action issued a redirect, we're done ! if ( CTX->response->is_redirect ) { ! $log->is_info && ! $log->info( "Action specified a redirect" ); ! return; } # If an action set a file to send back, we're done if ( my $send_file = CTX->response->send_file ) { $log->is_info && *************** *** 113,116 **** --- 114,129 ---- } + sub _action_error_content { + my ($self, $error) = @_; + $log ||= get_logger( LOG_ACTION ); + + $log->error( "Caught exception from action: $error" ); + + # TODO: Set this error message from config file + $self->add_content_param( title => 'Action execution error' ); + + return $error; + } + ######################################## # CONTENT PARAMS |
From: <a_...@us...> - 2006-02-01 20:22:21
|
Update of /cvsroot/openinteract/OpenInteract2/sample/website/cgi-bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6357/sample/website/cgi-bin Modified Files: oi2.fcgi Log Message: OIN-189: use CGI::Fast instead of FCGI Index: oi2.fcgi =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/website/cgi-bin/oi2.fcgi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** oi2.fcgi 18 Feb 2005 03:29:40 -0000 1.1 --- oi2.fcgi 1 Feb 2006 20:22:10 -0000 1.2 *************** *** 4,8 **** use strict; ! use FCGI; use File::Spec::Functions qw( catfile ); use Log::Log4perl; --- 4,8 ---- use strict; ! use CGI::Fast; use File::Spec::Functions qw( catfile ); use Log::Log4perl; *************** *** 24,32 **** $ctx->assign_response_type( 'cgi' ); ! my $fcgi_request = FCGI::Request(); ! while ( $fcgi_request->Accept() >= 0 ) { my $response = OpenInteract2::Response->new(); ! my $request = OpenInteract2::Request->new(); OpenInteract2::Auth->new()->login(); --- 24,32 ---- $ctx->assign_response_type( 'cgi' ); ! my $fcgi; ! while ( $fcgi = CGI::Fast->new() ) { my $response = OpenInteract2::Response->new(); ! my $request = OpenInteract2::Request->new( { cgi => $fcgi } ); OpenInteract2::Auth->new()->login(); |
From: <a_...@us...> - 2006-02-01 20:18:47
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Response In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4756/lib/OpenInteract2/Response Modified Files: Apache.pm Apache2.pm CGI.pm LWP.pm Standalone.pm Log Message: Response classes now store redirect headers and write them at send() instead of writing them instantly Index: Apache.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Response/Apache.pm,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Apache.pm 21 Sep 2005 03:35:23 -0000 1.22 --- Apache.pm 1 Feb 2006 20:18:34 -0000 1.23 *************** *** 97,102 **** $log ||= get_logger( LOG_RESPONSE ); - $self->save_session; - $url ||= $self->return_url; $log->is_info && --- 97,100 ---- Index: Apache2.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Response/Apache2.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Apache2.pm 17 Mar 2005 14:58:05 -0000 1.7 --- Apache2.pm 1 Feb 2006 20:18:34 -0000 1.8 *************** *** 92,97 **** $log ||= get_logger( LOG_RESPONSE ); - $self->save_session; - $url ||= $self->return_url; $log->is_info && --- 92,95 ---- *************** *** 99,103 **** "'Location' header to '$url'" ); $self->status( RC_FOUND ); ! $self->header_out( Location => $url ); return; } --- 97,101 ---- "'Location' header to '$url'" ); $self->status( RC_FOUND ); ! $self->header( Location => $url ); return; } Index: CGI.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Response/CGI.pm,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** CGI.pm 22 Oct 2005 21:53:45 -0000 1.21 --- CGI.pm 1 Feb 2006 20:18:34 -0000 1.22 *************** *** 64,71 **** } ! unless ( $self->is_redirect ) { ! $self->out( $self->generate_cgi_header_fields, "\r\n\r\n" ); ! $self->out( $self->content ); ! } } --- 64,69 ---- } ! $self->out( $self->generate_cgi_header_fields, "\r\n\r\n" ); ! $self->out( $self->content ); } *************** *** 96,101 **** $log ||= get_logger( LOG_RESPONSE ); - $self->save_session; - $url ||= $self->return_url; $log->is_info && --- 94,97 ---- *************** *** 103,111 **** "'Location' header to '$url'" ); $self->status( RC_FOUND ); ! my @header = (); ! push @header, "Status: 302 Moved"; ! push @header, "Location: $url"; ! push @header, $self->_generate_cookie_lines; ! $self->out( join( "\r\n", @header ), "\r\n\r\n" ); } --- 99,103 ---- "'Location' header to '$url'" ); $self->status( RC_FOUND ); ! $self->header( Location => $url ); } Index: LWP.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Response/LWP.pm,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** LWP.pm 17 Mar 2005 14:58:05 -0000 1.22 --- LWP.pm 1 Feb 2006 20:18:34 -0000 1.23 *************** *** 32,40 **** $log->is_info && $log->info( "Sending LWP response" ); ! if ( $self->is_redirect ) { ! $log->is_info ! && $log->info( "Response is redirect, already sent" ); ! return; ! } $self->content_type( 'text/html' ) unless ( $self->content_type ); $self->status( RC_OK ) unless ( $self->status ); --- 32,36 ---- $log->is_info && $log->info( "Sending LWP response" ); ! $self->content_type( 'text/html' ) unless ( $self->content_type ); $self->status( RC_OK ) unless ( $self->status ); *************** *** 49,53 **** $self->lwp_response( HTTP::Response->new( $self->status ) ); } ! if ( my $filename = $self->send_file ) { $self->set_file_info; $self->_set_lwp_headers; --- 45,61 ---- $self->lwp_response( HTTP::Response->new( $self->status ) ); } ! ! if ( $self->is_redirect ) { ! $self->_set_lwp_headers; ! if ( my $client = $self->client ) { ! $client->send_response( $self->lwp_response ); ! $log->is_info && $log->info( "Sent redirect response" ); ! } ! else { ! $log->is_info && ! $log->info( "Set content/headers but did not send content" ); ! } ! } ! elsif ( my $filename = $self->send_file ) { $self->set_file_info; $self->_set_lwp_headers; *************** *** 79,106 **** $log ||= get_logger( LOG_RESPONSE ); - $self->save_session; - $url ||= $self->return_url; $log->is_info && ! $log->info( "Got request for redirect to '$url'" ); - my $lwp_response = $self->lwp_response; - unless ( $lwp_response ) { - $self->lwp_response( HTTP::Response->new( RC_FOUND ) ); - $lwp_response = $self->lwp_response; - } - else { - $lwp_response->code( RC_FOUND ); - } $self->status( RC_FOUND ); ! $lwp_response->header( Location => $url ); ! $log->is_info && ! $log->info( "Set 'Location' header to ", $lwp_response->header( 'Location' ) ); ! $self->_set_lwp_cookies; ! $log->debug( "Getting ready to send response: ", CTX->dump( $lwp_response ) ); ! if ( my $client = $self->client ) { ! $client->send_response( $lwp_response ); ! } ! $log->is_info && $log->info( "Sent redirect ok" ); } --- 87,97 ---- $log ||= get_logger( LOG_RESPONSE ); $url ||= $self->return_url; $log->is_info && ! $log->info( "Assigning redirect status and redirect ", ! "'Location' header to '$url'" ); $self->status( RC_FOUND ); ! $self->header( Location => $url ); } Index: Standalone.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Response/Standalone.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Standalone.pm 17 Mar 2005 14:58:05 -0000 1.15 --- Standalone.pm 1 Feb 2006 20:18:34 -0000 1.16 *************** *** 91,100 **** sub redirect { my ( $self, $url ) = @_; ! $self->save_session; ! my @header = (); ! push @header, "Status: 302 Moved"; ! push @header, "Location: $url"; ! push @header, $self->_generate_cookie_lines; ! $self->out( join( "\r\n", @header ), "\r\n\r\n" ); } --- 91,102 ---- sub redirect { my ( $self, $url ) = @_; ! $log ||= get_logger( LOG_RESPONSE ); ! ! $url ||= $self->return_url; ! $log->is_info && ! $log->info( "Assigning redirect status and redirect ", ! "'Location' header to '$url'" ); ! $self->status( RC_FOUND ); ! $self->header( Location => $url ); } |
From: <a_...@us...> - 2006-02-01 16:37:42
|
Update of /cvsroot/openinteract/OpenInteract2/sample/apache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32469 Modified Files: FILES httpd_cgi_solo.conf Added Files: httpd_fcgi_solo.conf Log Message: A separate config file for fcgi --- NEW FILE: httpd_fcgi_solo.conf --- # Change manually: # -- Change '127.0.0.1' to your IP address # -- Change 'web...@my...' to your contact e-mail address # -- Change 'www.mycompany.com' to your website hostname # If you're using Named virtual hosts, just remove the 'Listen' line Listen 127.0.0.1:80 <VirtualHost 127.0.0.1:80> Port 80 ServerAdmin web...@my... ServerName www.mycompany.com #SuexecUserGroup user group DocumentRoot [% website_dir %]/html LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined CustomLog [% website_dir %]/logs/access_log combined ErrorLog [% website_dir %]/logs/error_log AddHandler fastcgi-script .fcgi Alias /cgi-bin [% website_dir %]/cgi-bin <Directory [% website_dir %]/cgi-bin> AllowOverride None Options ExecCGI Order allow,deny Allow from all </Directory> # Override any global /images alias #Alias /images [% website_dir %]/html/images # This sends all incoming requests (except for images, robot help and # dumb Code Red requests) to the OpenInteract cgi script handler # (/cgi-bin/oi2.cgi) # Tell mod_rewrite to start working for this VirtualHost RewriteEngine On # Any URL beginning with /images will be answered by this server and # no further mod_rewrite rules will be processed RewriteRule ^/images - [L] # Enable your front-end server to handle search engine requests RewriteRule ^/robots\.txt - [L] # Discard (with a '403 Forbidden') requests for the Code Red document # (hole in IIS servers that can keep your server busy...) RewriteRule ^/default\.ida - [F] # Pass all other request to the oi2 cgi script RewriteRule ^/(.*) [% website_dir %]/cgi-bin/oi2.fcgi/$1 [L] </VirtualHost> Index: FILES =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/apache/FILES,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FILES 5 Jan 2004 11:49:39 -0000 1.2 --- FILES 1 Feb 2006 16:37:28 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- httpd_cgi_solo.conf --> conf httpd_cgi_solo.conf + httpd_fcgi_solo.conf --> conf httpd_fcgi_solo.conf httpd_modperl.conf --> conf httpd_modperl.conf httpd_modperl_solo.conf --> conf httpd_modperl_solo.conf Index: httpd_cgi_solo.conf =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/sample/apache/httpd_cgi_solo.conf,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** httpd_cgi_solo.conf 17 Mar 2005 13:51:59 -0000 1.4 --- httpd_cgi_solo.conf 1 Feb 2006 16:37:28 -0000 1.5 *************** *** 18,23 **** ErrorLog [% website_dir %]/logs/error_log - # Uncomment for using FastCGI - #AddHandler fastcgi-script .fcgi AddHandler cgi-script .cgi --- 18,21 ---- |
From: Teemu A. <in...@us...> - 2006-01-25 11:55:59
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28422/lib/OpenInteract2 Modified Files: SessionManager.pm Log Message: Fix to session handling as suggested on mailing list. _create_session -> create Index: SessionManager.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/SessionManager.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** SessionManager.pm 18 Mar 2005 04:09:48 -0000 1.9 --- SessionManager.pm 25 Jan 2006 11:55:51 -0000 1.10 *************** *** 139,143 **** $log->info( "Create new session with data from hashref using ", "keys: ", keys %{ $session } ); ! my $new_session = $class->_create_session; if ( $new_session ) { foreach my $key ( keys %{ $session } ) { --- 139,143 ---- $log->info( "Create new session with data from hashref using ", "keys: ", keys %{ $session } ); ! my $new_session = $class->create; if ( $new_session ) { foreach my $key ( keys %{ $session } ) { |
From: Teemu A. <in...@us...> - 2006-01-18 20:09:00
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30568/lib/OpenInteract2 Modified Files: Observer.pm Log Message: Trivial fix from Antti :) Index: Observer.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Observer.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Observer.pm 17 Jan 2006 20:24:05 -0000 1.6 --- Observer.pm 18 Jan 2006 20:08:52 -0000 1.7 *************** *** 192,196 **** push @all_mappings, $ini_mappings; ! foreach my $pkg ( @all_mappings ) { next unless ( ref $mappings eq 'HASH' ); --- 192,196 ---- push @all_mappings, $ini_mappings; ! foreach my $mappings ( @all_mappings ) { next unless ( ref $mappings eq 'HASH' ); |
From: Teemu A. <in...@us...> - 2006-01-17 22:57:40
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv485/lib/OpenInteract2 Modified Files: Package.pm Log Message: Package.pm -> Config/Package.pm :) my bad. Index: Package.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Package.pm,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** Package.pm 17 Jan 2006 20:24:05 -0000 1.63 --- Package.pm 17 Jan 2006 22:57:32 -0000 1.64 *************** *** 1,261 **** ! package OpenInteract2::Config::Package; # $Id$ use strict; ! use base qw( Class::Accessor::Fast ); ! use OpenInteract2::Config::Ini; ! use File::Basename qw( dirname ); ! use File::Spec::Functions qw( catfile rel2abs ); use Log::Log4perl qw( get_logger ); [...2421 lines suppressed...] ! B<repository>: The ! L<OpenInteract2::Repository|OpenInteract2::Repository> associated with ! this package. ! ! B<installed_date>: Date the package was installed. This is typically ! stored in the C<repository> associated with the package. ! ! B<config>: The ! L<OpenInteract2::Config::Package|OpenInteract2::Config::Package> ! object associated with this package. =head1 SEE ALSO ! L<OpenInteract2::Manual::Packages|OpenInteract2::Manual::Packages> ! L<OpenInteract2::Repository|OpenInteract2::Repository> ! L<OpenInteract2::Config::Package|OpenInteract2::Config::Package> =head1 COPYRIGHT |
From: Teemu A. <in...@us...> - 2006-01-17 22:57:40
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv485/lib/OpenInteract2/Config Modified Files: Package.pm Log Message: Package.pm -> Config/Package.pm :) my bad. Index: Package.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Config/Package.pm,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Package.pm 17 Mar 2005 14:58:00 -0000 1.24 --- Package.pm 17 Jan 2006 22:57:32 -0000 1.25 *************** *** 27,31 **** spops_file action_file message_file module sql_installer template_plugin ! observer config_watcher description ); my @OBJECT_FIELDS = qw( filename package_dir ); --- 27,31 ---- spops_file action_file message_file module sql_installer template_plugin ! observer observer_map config_watcher description ); my @OBJECT_FIELDS = qw( filename package_dir ); *************** *** 535,539 **** the plugin by the key, the value is used to instantiate the plugin. ! B<observers> (\%) Observers (commonly in the guise of filters) defined by this --- 535,539 ---- the plugin by the key, the value is used to instantiate the plugin. ! B<observer> (\%) Observers (commonly in the guise of filters) defined by this *************** *** 542,545 **** --- 542,550 ---- value defines the observer class. + B<observer_map> (\%) + + Key/value pairs defining observer's name as the key and observed + action's name as the value. + B<config_watcher> (\@) |
From: Teemu A. <in...@us...> - 2006-01-17 20:24:15
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27603/lib/OpenInteract2 Modified Files: Observer.pm Package.pm Log Message: package.ini can now be used to map observers to actions using observer_map section. Chris, please review. Index: Observer.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Observer.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Observer.pm 21 Sep 2005 04:08:53 -0000 1.5 --- Observer.pm 17 Jan 2006 20:24:05 -0000 1.6 *************** *** 117,138 **** my $observer_registry = $class->_register_initial_observers( ! $observer_ini->{observer}, CTX->packages ); $li->is_info && $li->info( "Registered internal observers ok" ); CTX->set_observer_registry( $observer_registry ); ! my $mappings = $observer_ini->{map}; ! if ( ref $mappings eq 'HASH' ) { ! while ( my ( $observer_name, $action_info ) = each %{ $mappings } ) { ! my @actions = ( ref $action_info ) ! ? @{ $action_info } : ( $action_info ); ! foreach my $action_name ( @actions ) { ! $li->is_info && ! $li->info( "Trying to add observer '$observer_name' to ", ! "action '$action_name'" ); ! $class->add_observer_to_action( $observer_name, $action_name ); ! } ! } ! } return; } --- 117,128 ---- my $observer_registry = $class->_register_initial_observers( ! $observer_ini->{observer}, CTX->packages, $li ); $li->is_info && $li->info( "Registered internal observers ok" ); CTX->set_observer_registry( $observer_registry ); ! $class->_register_initial_mappings( ! $observer_ini->{map}, CTX->packages, $li ); ! return; } *************** *** 145,150 **** sub _register_initial_observers { ! my ( $class, $ini_observers, $packages ) = @_; ! my $li = get_logger( LOG_INIT ); my %observer_map = (); --- 135,140 ---- sub _register_initial_observers { ! my ( $class, $ini_observers, $packages, $li ) = @_; ! $li ||= get_logger( LOG_INIT ); my %observer_map = (); *************** *** 192,195 **** --- 182,211 ---- } + sub _register_initial_mappings { + my ( $class, $ini_mappings, $packages, $li ) = @_; + $li ||= get_logger( LOG_INIT ); + + # Cycle through packages' mappings and then ini_mappings. + + my @all_mappings = (); + push @all_mappings, $_->config->observer_map for @$packages; + push @all_mappings, $ini_mappings; + + foreach my $pkg ( @all_mappings ) { + next unless ( ref $mappings eq 'HASH' ); + + while ( my ( $observer_name, $action_info ) = each %{ $mappings } ) { + my @actions = ( ref $action_info ) + ? @{ $action_info } : ( $action_info ); + foreach my $action_name ( @actions ) { + $li->is_info && + $li->info( "Trying to add observer '$observer_name' to ", + "action '$action_name'" ); + $class->add_observer_to_action( $observer_name, $action_name ); + } + } + } + } + sub _require_module { my ( $class, $to_require ) = @_; *************** *** 231,236 **** allcaps = news ! # You can also declare the observer in your package's package.conf ! # file; it's mapped the same no matter where it's declared # File: pkg/mypackage-2.00/package.ini --- 247,252 ---- allcaps = news ! # You can also declare a class observer in your package's package.ini ! # file; it's mapped the same no matter where it's declared. # File: pkg/mypackage-2.00/package.ini *************** *** 242,247 **** [package observer] allcaps = OpenInteract2::Filter::AllCaps ! ! ... # Create the filter -- see OpenInteract2::Filter::AllCaps shipped --- 258,266 ---- [package observer] allcaps = OpenInteract2::Filter::AllCaps ! ! # You can also map observers to actions in package.ini. ! ! [package observer_map] ! allcaps = news # Create the filter -- see OpenInteract2::Filter::AllCaps shipped *************** *** 422,426 **** =head2 Configuration: Mapping the Observer to an Action ! Mapping an observer to an action is exclusively done in C<$WEBSITE_DIR/conf/observer.ini>. Under the 'map' section you assign an observer to one or more actions. Here as assign the observer 'wiki' --- 441,445 ---- =head2 Configuration: Mapping the Observer to an Action ! Mapping an observer to an action is done in C<$WEBSITE_DIR/conf/observer.ini>. Under the 'map' section you assign an observer to one or more actions. Here as assign the observer 'wiki' *************** *** 438,441 **** --- 457,467 ---- object_tag = news + Mappings can also be defined in package.ini in the 'observer_map' + section: + + [observer_map] + @,wiki = news,page + object_tag = news + Note that the mapping is ignorant of: Index: Package.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Package.pm,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** Package.pm 22 Oct 2005 21:56:03 -0000 1.62 --- Package.pm 17 Jan 2006 20:24:05 -0000 1.63 *************** *** 1,1448 **** ! package OpenInteract2::Package; # $Id$ use strict; ! use base qw( Exporter Class::Accessor::Fast ); ! use Archive::Zip qw( :ERROR_CODES ); ! use Cwd qw( cwd ); ! use Data::Dumper qw( Dumper ); ! use ExtUtils::Manifest (); [...2423 lines suppressed...] ! events at server startup. You can use this to create custom, concise ! directives for your SPOPS and/or Action configurations that get ! expanded into either more meaningful information or into data that can ! only be found at runtime. That may be a little abstract: see ! L<OpenInteract2::Config::Initializer|OpenInteract2::Config::Initializer> ! for examples. ! C<description> ($*) ! Description of this package. =head1 SEE ALSO ! L<OpenInteract2::Package|OpenInteract2::Package> ! L<Class::Accessor|Class::Accessor> ! L<OpenInteract2::Config::Ini> =head1 COPYRIGHT |