/[pub]/suikawiki/wikidata/suikawiki-config.ph
Suika

Diff of /suikawiki/wikidata/suikawiki-config.ph

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

revision 1.10 by wakaba, Sat Jul 26 09:22:36 2003 UTC revision 1.11 by wakaba, Tue Sep 16 05:14:52 2003 UTC
# Line 10  use strict; Line 10  use strict;
10      external_script     => '../wiki/script/',      external_script     => '../wiki/script/',
11      script_short_name   => 'wiki',      script_short_name   => 'wiki',
12      ## If you use CVS repository of WikiDatabase,      ## If you use CVS repository of WikiDatabase,
13      #cvs_repository     => 'http://path-to-viewcvs/path-to-repository/',      cvs_repository      => '/gate/cvs/suikawiki/wikidata/page/',
14    );    );
15    our $url_cgi; {    our $url_cgi; {
16      my $scheme = 'http';      my $scheme = 'http';
17      $scheme = lc $1 if $main::ENV{SERVER_PROTOCOL} =~ m#([A-Za-z0-9+.%-]+)#;      $scheme = lc $1 if $main::ENV{SERVER_PROTOCOL} =~ m#([A-Za-z0-9+.%-]+)#;
18      $url_cgi = "$scheme://$main::ENV{SERVER_NAME}".($main::ENV{SERVER_PORT}==80?'':":$main::ENV{SERVER_PORT}")."$uri{cookie_path}$uri{script_short_name}";      $url_cgi = "$scheme://".($main::ENV{HTTP_HOST} || $main::ENV{SERVER_NAME}.($main::ENV{SERVER_PORT}==80?'':":$main::ENV{SERVER_PORT}"))."$uri{cookie_path}$uri{script_short_name}";
19    }    }
20    $uri{wiki_abs} = $url_cgi;    $uri{wiki_abs} = $url_cgi;
21    $uri{wiki} = qq($uri{cookie_path}$uri{script_short_name});        $uri{wiki} = qq($uri{cookie_path}$uri{script_short_name});    
# Line 27  use strict; Line 27  use strict;
27          q(misc/plugins/),          q(misc/plugins/),
28    );    );
29    our %PathTo = (       ## Path to your data, from the main CGI script (NOT from this config script)    our %PathTo = (       ## Path to your data, from the main CGI script (NOT from this config script)
30      CachePrefix         => q(./wikidata/.cache.),                   CachePrefix            => q(./wikidata/.cache.),
31      TempPrefix  => q(./wikidata/.tmp.),                   TempPrefix             => q(./wikidata/.tmp.),
32      WikiDataBase        => q(./wikidata/page),                   WikiDataBase   => q(./wikidata/page),
33      WikiDatabaseErrorLog        => q(./wikidata/error.log),                   WikiDatabase           => q(./wikidata/page),
34      convert     => q(/usr/X11R6/bin/convert),                   WikiDatabaseErrorLog   => q(./wikidata/log/error.log),
35                     convert                => q(/usr/X11R6/bin/convert),
36    );    );
37    
38    require SuikaWiki::DB::Util::Lock;
39    our $locker = SuikaWiki::DB::Util::Lock->new (-directory => q(./wikidata/lock),
40       -name => 'wikipage',
41       -retry => ($main::ENV{HTTP_USER_AGENT} =~ m#Openbot/3# ? 2 : 120),
42       -error_handler => sub {
43         my ($self, %o) = @_;
44           open LOG, '>>', $main::PathTo{WikiDatabaseErrorLog};
45             print LOG scalar (gmtime)."\@@{[time]} @{[$$]} {$o{level}}: ", $o{msg}, "\n";
46           close LOG;
47         if ($o{level} eq 'fatal') {
48           die $o{msg};
49         }
50       });
51    $locker->lock or do {
52      open LOG, '>>', $main::PathTo{WikiDatabaseErrorLog};
53        print LOG scalar (time), " Can't lock\n";
54      close LOG;
55      die "Can't lock";
56    };
57    
58    
59    
60  ## Type of WikiPage Database  ## Type of WikiPage Database
61    #our $modifier_dbtype = 'AnyDBM_File';  # Fast, not available on some server, page size limited.    #our $modifier_dbtype = 'AnyDBM_File';  # Fast, not available on some server, page size limited.
62    #our $modifier_dbtype = 'dbmopen';      # Fast, not available on some server, page size limited.    #our $modifier_dbtype = 'dbmopen';      # Fast, not available on some server, page size limited.
# Line 76  SuikaWiki::View->template ('links')->add Line 99  SuikaWiki::View->template ('links')->add
99  %link-wiki(page=>"Wiki//Page//License",rel=>copyright,class=>wiki,title=>"%res(name=>GoToWikiPageLicenseLink);"p);  %link-wiki(page=>"Wiki//Page//License",rel=>copyright,class=>wiki,title=>"%res(name=>GoToWikiPageLicenseLink);"p);
100  EOH  EOH
101  SuikaWiki::View->template ('navbar')->add_line (<<"EOH");  SuikaWiki::View->template ('navbar')->add_line (<<"EOH");
102  %anchor-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,label=>"%res(name=>EditThisPage);"p,title=>"%res(name=>EditThisPageLong);"p,accesskey=>E);  %anchor-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,label=>"%res(name=>EditThisPage);"p,title=>"%res(name=>EditThisPageLong);"p,accesskey=>E,add-param=>{#edit});
103  %anchor-wiki(rel=>view,up_to_date,class=>wiki-cmd,label=>"%res(name=>ViewThisPage);"p,title=>"%res(name=>ViewThisPageLong);"p);  %anchor-wiki(rel=>view,up_to_date,class=>wiki-cmd,label=>"%res(name=>ViewThisPage);"p,title=>"%res(name=>ViewThisPageLong);"p);
104  %anchor-wiki(page=>{$main::PageName{CreatePage}},class=>wiki,label=>"%res(name=>GoToCreatePage);"p,title=>"%res(name=>GoToCreatePageLong);"p);  %anchor-wiki(page=>{$main::PageName{CreatePage}},class=>wiki,label=>"%res(name=>GoToCreatePage);"p,title=>"%res(name=>GoToCreatePageLong);"p);
105  %anchor-wiki(page=>{$main::PageName{IndexPage}},class=>wiki,label=>"%res(name=>GoToIndexPage);"p,title=>"%res(name=>GoToIndexPageLong);"p);  %anchor-wiki(page=>{$main::PageName{IndexPage}},class=>wiki,label=>"%res(name=>GoToIndexPage);"p,title=>"%res(name=>GoToIndexPageLong);"p);

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24