/[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.13 by wakaba, Thu Mar 11 10:09:41 2004 UTC revision 1.14 by wakaba, Fri Mar 12 04:56:00 2004 UTC
# Line 19  This file is part of SuikaWiki. Line 19  This file is part of SuikaWiki.
19    
20  package wiki::driver::http;  package wiki::driver::http;
21  use strict;  use strict;
22    use Message::Util::Error;
23    
24  sub config ($) {  push our @Config, sub ($) {
25    my $WIKI = shift;    my $WIKI = shift;
26    use Cwd qw(abs_path);    use Cwd qw(abs_path);
27        
28    ## -- Filesystem path mapping    ## -- Filesystem path mapping
29    for (    for (
30       [db__cache__dir          => q"./wikidata/lock/"],       [db__cache__dir          => q"./wikidata/lock/"],
31         [db__cache_struct__file  => q"./wikidata/lock/struct.db"],
32       [db__content__dir        => q"./wikidata/page/"],       [db__content__dir        => q"./wikidata/page/"],
33       [db__content__error_log  => q"./wikidata/log/db-content.log"],       [db__content__error_log  => q"./wikidata/log/db-content.log"],
34       [db__bdb__home_dir       => q"./wikidata/lock/"],       [db__bdb__home_dir       => q"./wikidata/lock/"],
# Line 107  sub config ($) { Line 109  sub config ($) {
109            $opt{prop_info}->{-db}->close;            $opt{prop_info}->{-db}->close;
110            delete $opt{prop_info}->{-db};            delete $opt{prop_info}->{-db};
111          }});          }});
112          $wiki->{db}->_set_prop_db (ref__item_template =>
113            {-db => $cachedb, -prop => 'refereritem', -db_close => sub {
114              my %opt = @_;
115              $opt{prop_info}->{-db}->close;
116              delete $opt{prop_info}->{-db};
117            }});
118                
119        ## Berkely DB Environment Preparation        ## Berkely DB Environment Preparation
120        use BerkeleyDB;        use BerkeleyDB;
# Line 120  sub config ($) { Line 128  sub config ($) {
128           -ErrFile => $wiki->{config}->{path_to}->{db__bdb__log_file},           -ErrFile => $wiki->{config}->{path_to}->{db__bdb__log_file},
129           -Flags => DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL,           -Flags => DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL,
130           -Verbose => $wiki->{config}->{debug}->{db};           -Verbose => $wiki->{config}->{debug}->{db};
131    
132          $wiki->{db}->_set_prop_db (content__structured => {-db_open => sub {
133            require SuikaWiki::DB::Hash;
134            new SuikaWiki::DB::Hash constructor => sub {
135              use MLDBM qw(BerkeleyDB::Hash);# Storable);
136              tie my %mldb, 'MLDBM',
137                            -Filename => $wiki->{config}->{path_to}
138                                              ->{db__cache_struct__file},
139                            -Env => $bdbenv,
140                            -Flags => DB_CREATE,
141                            -Mode => 0644;
142              \%mldb;
143           };
144          }});
145                
146        ## Referer Database (See Referer plugin module)        ## Referer Database (See Referer plugin module)
147        $wiki->{db}->_set_prop_db (referer => {-db_open => sub {        $wiki->{db}->_set_prop_db (referer => {-db_open => sub {
# Line 222  sub config ($) { Line 244  sub config ($) {
244      view => 0,      view => 0,
245    };    };
246    
247  }  };
248    
249  =head1 SEE ALSO  =head1 SEE ALSO
250    

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24