/[pub]/suikawiki/script/default/suikawiki-config.ph
Suika

Diff of /suikawiki/script/default/suikawiki-config.ph

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by wakaba, Sun Apr 25 07:12:56 2004 UTC revision 1.19 by wakaba, Sat May 1 04:03:00 2004 UTC
# Line 33  use Message::Util::QName::General [q<Exp Line 33  use Message::Util::QName::General [q<Exp
33    
34  push our @Config, sub ($) {  push our @Config, sub ($) {
35    my $WIKI = shift;    my $WIKI = shift;
36    use Cwd qw(abs_path);    use FindBin q($Bin);
37      use File::Spec;
38        
39    ## -- Filesystem path mapping    ## -- Filesystem path mapping
40    for (    for (
# Line 53  push our @Config, sub ($) { Line 54  push our @Config, sub ($) {
54    ) {    ) {
55      ## On system that does not set current directory as main script      ## On system that does not set current directory as main script
56      ## directory, you should specify it instead of using "abs_path".      ## directory, you should specify it instead of using "abs_path".
57      $WIKI->{config}->{path_to}->{$_->[0]} = abs_path $_->[1];      $WIKI->{config}->{path_to}->{$_->[0]} = File::Spec->catfile ($Bin, $_->[1]);
58    }    }
59    
60  =begin comment  =begin comment
# Line 75  push our @Config, sub ($) { Line 76  push our @Config, sub ($) {
76    
77  =end comment  =end comment
78    
79    =cut
80    
81    ## -- WikiPlugin    ## -- WikiPlugin
82    push @{$WIKI->{event}->{plugin_manager_loaded}}, sub {    push @{$WIKI->{event}->{plugin_manager_loaded}}, sub {
83      my $wiki = shift;      my $wiki = shift;
# Line 105  push our @Config, sub ($) { Line 108  push our @Config, sub ($) {
108             directory_suffix => '.ns',             directory_suffix => '.ns',
109             file_suffix    => '.txt',             file_suffix    => '.txt',
110             root_key => $wiki->{config}->{page}->{Default},             root_key => $wiki->{config}->{page}->{Default},
111             -lock => $wiki->{var}->{db}->{lock_prop}->('content_prop'));             -lock => $wiki->{var}->{db}->{lock_prop}->('content'));
112        }, -db_close => sub {        }, -db_close => sub {
113          my %opt = @_;          my %opt = @_;
114          $opt{prop_info}->{-db}->close;          $opt{prop_info}->{-db}->close;
# Line 120  push our @Config, sub ($) { Line 123  push our @Config, sub ($) {
123             directory_suffix => '.ns',             directory_suffix => '.ns',
124             file_suffix    => '.prop',             file_suffix    => '.prop',
125             root_key => $wiki->{config}->{page}->{Default},             root_key => $wiki->{config}->{page}->{Default},
126             -lock => $wiki->{var}->{db}->{lock_prop}->('content'));             -lock => $wiki->{var}->{db}->{lock_prop}->('content_prop'));
127        }, -db_close => sub {        }, -db_close => sub {
128          my %opt = @_;          my %opt = @_;
129          $opt{prop_info}->{-db}->close;          $opt{prop_info}->{-db}->close;
# Line 183  push our @Config, sub ($) { Line 186  push our @Config, sub ($) {
186        # ...            # ...    
187    };    };
188    
   push @{$WIKI->{event}->{input_close}}, sub {  
     my ($wiki, $event) = @_;  
     try {  
       SuikaWiki::Plugin->module_package ('Referer')  
                      ->add_referer (wiki => $wiki,  
                                     uri => $wiki->{input}->meta_variable  
                                              ('HTTP_REFERER'));  
     } catch SuikaWiki::Plugin::error with {  
       my $err = shift;  
       $err->raise unless $err->{-type} eq 'PLUGIN_NOT_FOUND';  
     };  
     try {  
       SuikaWiki::Plugin->module_package ('RequestLog')  
                      ->http_request_log (wiki => $wiki,  
                                          prop => 'log__http_request');  
     } catch SuikaWiki::Plugin::error with {  
       my $err = shift;  
       $err->raise unless $err->{-type} eq 'PLUGIN_NOT_FOUND';  
     };  
   };  
   
189    ## -- WikiName of special purpose WikiPages    ## -- WikiName of special purpose WikiPages
190    $WIKI->{config}->{page} = {    $WIKI->{config}->{page} = {
191      Default         => $WIKI->name ([qw/HomePage/]),      Default         => $WIKI->name ([qw/HomePage/]),

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.19

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24