- Timestamp:
- 06/01/08 20:08:58 (5 years ago)
- Location:
- lang/perl/mobirc/branches/plaggerize
- Files:
-
- 1 added
- 8 modified
-
CONCEPT (modified) (1 diff)
-
lib/App/Mobirc/HTTPD/C.pm (modified) (1 diff)
-
lib/App/Mobirc/HTTPD/C/Mobile.pm (modified) (1 diff)
-
lib/App/Mobirc/HTTPD/Handler.pm (modified) (2 diffs)
-
lib/App/Mobirc/Plugin/Authorizer/Cookie.pm (modified) (3 diffs)
-
lib/App/Mobirc/Plugin/DocRoot.pm (modified) (2 diffs)
-
lib/App/Mobirc/Plugin/HTMLFilter/ConvertPictograms.pm (modified) (1 diff)
-
lib/App/Mobirc/Plugin/HTMLFilter/DoCoMoCSS.pm (modified) (1 diff)
-
lib/App/Mobirc/Validator.pm (added)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/mobirc/branches/plaggerize/CONCEPT
r12977 r12990 20 20 -- HTTPD::* => Web::* 21 21 -- hirose31's Groups => Hook. 22 -- validate_hook を、もうちょいなんとかかっこよく実装したい。 23 -
lang/perl/mobirc/branches/plaggerize/lib/App/Mobirc/HTTPD/C.pm
r12910 r12990 39 39 $c->res->body( $content ); 40 40 41 context->run_hook('response_filter' );41 context->run_hook('response_filter', $c); 42 42 } 43 43 -
lang/perl/mobirc/branches/plaggerize/lib/App/Mobirc/HTTPD/C/Mobile.pm
r12910 r12990 122 122 recent_mode => $c->req->params->{recent_mode}, 123 123 message => $c->req->params->{'msg'} || '', 124 channel_page_option => [ 125 context->run_hook('channel_page_option', $channel, $c) 126 ], 124 channel_page_option => context->run_hook('channel_page_option', $channel, $c), 127 125 irc_nick => irc_nick, 128 126 } -
lang/perl/mobirc/branches/plaggerize/lib/App/Mobirc/HTTPD/Handler.pm
r12910 r12990 17 17 my $c = shift; 18 18 19 context->run_hook('request_filter' );19 context->run_hook('request_filter', $c); 20 20 21 21 if (authorize($c)) { … … 24 24 $c->res->set_http_response($response); 25 25 } 26 context->run_hook('response_filter' );26 context->run_hook('response_filter', $c); 27 27 } else { 28 28 $c->res->status(401); -
lang/perl/mobirc/branches/plaggerize/lib/App/Mobirc/Plugin/Authorizer/Cookie.pm
r12975 r12990 7 7 use Digest::MD5 (); 8 8 use Encode; 9 use App::Mobirc::Validator; 9 10 10 11 has password => ( … … 21 22 22 23 hook authorize => sub { 23 my ( $self, $global_context, $c, ) = @_;24 my ( $self, $global_context, $c, ) = validate_hook('authorize', @_); 24 25 25 26 my $cookie_str = $c->req->header('Cookie'); … … 41 42 42 43 hook response_filter => sub { 43 my ($self, $global_context, $c) = @_;44 my ($self, $global_context, $c) = validate_hook('response_filter', @_); 44 45 45 46 $c->res->cookies->{mobirc_key} = CGI::Cookie->new( -
lang/perl/mobirc/branches/plaggerize/lib/App/Mobirc/Plugin/DocRoot.pm
r12977 r12990 5 5 use XML::LibXML; 6 6 use Encode; 7 use Params::Validate ':all'; 7 8 8 9 has root => ( … … 13 14 14 15 hook request_filter => sub { 15 my ($self, $global_context, $c) = @_; 16 my ($self, $global_context, $c) = validate_pos(@_, 17 { isa => __PACKAGE__ }, 18 { isa => 'App::Mobirc' }, 19 { isa => 'HTTP::Engine::Context' }, 20 ); 16 21 17 22 my $root = $self->root; -
lang/perl/mobirc/branches/plaggerize/lib/App/Mobirc/Plugin/HTMLFilter/ConvertPictograms.pm
r12977 r12990 3 3 use MooseX::Plaggerize::Plugin; 4 4 use HTML::Entities::ConvertPictogramMobileJp qw(convert_pictogram_entities); 5 use Params::Validate ':all'; 5 6 6 7 hook html_filter => sub { 7 my ( $self, $global_context, $c, $content ) = @_; 8 my ($self, $global_context, $c, $content) = validate_pos(@_, 9 { isa => __PACKAGE__ }, 10 { isa => 'App::Mobirc' }, 11 { isa => 'HTTP::Engine::Context' }, 12 { type => SCALAR }, 13 ); 8 14 9 15 return ( -
lang/perl/mobirc/branches/plaggerize/lib/App/Mobirc/Plugin/HTMLFilter/DoCoMoCSS.pm
r12977 r12990 13 13 14 14 DEBUG "FILTER DOCOMO CSS"; 15 return $contentunless $c->req->mobile_agent->is_docomo;15 return ($c, $content) unless $c->req->mobile_agent->is_docomo; 16 16 17 17 # escape Numeric character reference.
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)