Changeset 94

Show
Ignore:
Timestamp:
12/21/09 22:19:15 (4 years ago)
Author:
bclapper
Message:

copy preamble support from Mungo

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/Mungo/Quiet.pm

    r91 r94  
    9696    if ($DEBUG) { print STDERR __PACKAGE__ . ':' . __LINE__ . "- Have filename " . $r->filename . "\n"; } 
    9797 
     98    my $preamble_class = $r->dir_config('MungoPreamble'); 
     99 
    98100    # Short circuit if we can't find the file. 
    99101    return NOT_FOUND if(! -r $r->filename); 
     
    114116 
    115117    eval { 
     118        my $doit = Apache2::Const::DECLINED(); 
    116119        $main::Request = $self->Request(); 
    117120        $main::Response = $self->Response(); 
    118121        $main::Server = $self->Server(); 
    119         if ($DEBUG) { print STDERR __PACKAGE__ . ':' . __LINE__ . "- Entering Include \n"; } 
    120         $self->Response()->Include($r->filename); 
    121         if ($DEBUG) { print STDERR __PACKAGE__ . ':' . __LINE__ . "- Survived Include \n"; } 
     122        if($preamble_class) { $doit = $preamble_class->handler($r, $self->Request(), $self->Response(), $self->Server()); } 
     123 
     124        if ( $doit == Apache2::Const::DECLINED() ) { 
     125            if ($DEBUG) { print STDERR __PACKAGE__ . ':' . __LINE__ . "- Entering Include \n"; } 
     126            $self->Response()->Include($r->filename); 
     127            if ($DEBUG) { print STDERR __PACKAGE__ . ':' . __LINE__ . "- Survived Include \n"; } 
     128        } 
    122129    }; 
    123130