/[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.18 by wakaba, Thu Jun 3 06:40:02 2004 UTC revision 1.24 by wakaba, Tue May 4 00:53:07 2010 UTC
# Line 28  use strict; Line 28  use strict;
28    use Message::Util::Error;    use Message::Util::Error;
29    
30  use Message::Util::QName::General [q<ExpandedURI>], {  use Message::Util::QName::General [q<ExpandedURI>], {
31      'bt' => q<http://suika.fam.cx/~wakaba/archive/2004/8/11/sw-bt#>,
32    'log' => q<http://suika.fam.cx/~wakaba/-temp/2004/05/01/reqlog#>,    'log' => q<http://suika.fam.cx/~wakaba/-temp/2004/05/01/reqlog#>,
33    'media-type' => q<http://suika.fam.cx/~wakaba/-temp/2004/04/24/mt#>,    'media-type' => q<http://suika.fam.cx/~wakaba/-temp/2004/04/24/mt#>,
34      'pe' => q<http://suika.fam.cx/~wakaba/archive/2004/7/20/sw-propedit#>,
35      'relrev' => q<http://suika.fam.cx/~wakaba/archive/2004/7/25/html-relrev#>,
36    'ss' => q<http://suika.fam.cx/~wakaba/archive/2004/05/sw-stylesheet#>,    'ss' => q<http://suika.fam.cx/~wakaba/archive/2004/05/sw-stylesheet#>,
37      'sw' => q<http://suika.fam.cx/~wakaba/archive/2004/7/20/sw#>,
38      'sw09' => q<http://suika.fam.cx/~wakaba/-temp/wiki/wiki?SuikaWiki%2F0.9#>,
39  };  };
40    
41  BEGIN {  BEGIN {
# Line 134  push our @Config, sub ($) { Line 139  push our @Config, sub ($) {
139             directory_suffix => '.ns',             directory_suffix => '.ns',
140             file_suffix    => '.txt',             file_suffix    => '.txt',
141             root_key => $wiki->{config}->{page}->{Default},             root_key => $wiki->{config}->{page}->{Default},
142             -lock => $wiki->{var}->{db}->{lock_prop}->('content_prop'));             -lock => $wiki->{var}->{db}->{lock_prop}->('content'));
143        }, -db_close => sub {        }, -db_close => sub {
144          my %opt = @_;          my %opt = @_;
145          $opt{prop_info}->{-db}->close;          $opt{prop_info}->{-db}->close;
# Line 149  push our @Config, sub ($) { Line 154  push our @Config, sub ($) {
154             directory_suffix => '.ns',             directory_suffix => '.ns',
155             file_suffix    => '.prop',             file_suffix    => '.prop',
156             root_key => $wiki->{config}->{page}->{Default},             root_key => $wiki->{config}->{page}->{Default},
157             -lock => $wiki->{var}->{db}->{lock_prop}->('content'));             -lock => $wiki->{var}->{db}->{lock_prop}->('content_prop'));
158        }, -db_close => sub {        }, -db_close => sub {
159          my %opt = @_;          my %opt = @_;
160          $opt{prop_info}->{-db}->close;          $opt{prop_info}->{-db}->close;
# Line 188  push our @Config, sub ($) { Line 193  push our @Config, sub ($) {
193          my $page = join '.ns/',          my $page = join '.ns/',
194                     map {s/([^0-9A-Za-z_-])/sprintf '+%02X', ord $1/ge;$_}                     map {s/([^0-9A-Za-z_-])/sprintf '+%02X', ord $1/ge;$_}
195                     @{$opt{wikiname}};                     @{$opt{wikiname}};
196          return URI->new ('wikidata/static/' . $page . '.css');          return URI->new ('wikidata/static/' . $page . '.css' .
197                             ($opt{lm} ? '?x-lm=' . $opt{lm} : ''));
198        };        };
199        ## Reverse mapping of generate-uri        ## Reverse mapping of generate-uri
200        $wiki->{config}->{ExpandedURI q<ss:uri-to-wikiname>} = sub {        $wiki->{config}->{ExpandedURI q<ss:uri-to-wikiname>} = sub {
# Line 300  push our @Config, sub ($) { Line 306  push our @Config, sub ($) {
306      };      };
307    };    };
308    
309    $WIKI->{config}->{engine_max_access} = 15;    $WIKI->{config}->{engine_robot_max_access} = 1;
310      $WIKI->{config}->{engine_max_access} = 3;
311    
312    ## -- WikiName of special purpose WikiPages    ## -- WikiName of special purpose WikiPages
313    $WIKI->{config}->{page} = {    $WIKI->{config}->{page} = {
# Line 342  push our @Config, sub ($) { Line 349  push our @Config, sub ($) {
349      q<IMT:text/css##> => 1,      q<IMT:text/css##> => 1,
350      q<IMT:text/plain##> => 1,      q<IMT:text/plain##> => 1,
351      q<IMT:text/x-suikawiki;version="0.9"##> => 1,      q<IMT:text/x-suikawiki;version="0.9"##> => 1,
352        q<IMT:text/x-suikawiki;version="0.10"##> => 1,
353        q<IMT:text/x.suikawiki.image;version="0.9"##> => 1,
354      q<IMT:application/x.suikawiki.config;version="2.0"##> => 1,      q<IMT:application/x.suikawiki.config;version="2.0"##> => 1,
355    };    };
356        
# Line 355  push our @Config, sub ($) { Line 364  push our @Config, sub ($) {
364      error     => {delta => 60},      error     => {delta => 60},
365    };    };
366    
367      ## -- User-editable content properties
368      $WIKI->{config}->{ExpandedURI q<pe:prop>} = {
369        'abstract' => {uri => ExpandedURI q<sw:abstract>,
370                       ExpandedURI q<media-type:media-type-prop>
371                           => ExpandedURI q<sw:abstract--type>},
372        'abstract--type' => {uri => ExpandedURI q<sw:abstract--type>,
373                             type => ExpandedURI q<media-type:media-type>,
374                             depend => [qw/abstract/]},
375        'category' => {uri => ExpandedURI q<sw:category>, is_list => 1,
376                       type => ExpandedURI q<sw:WikiName>,
377                       ExpandedURI q<pe:revWNList> => ExpandedURI q<pe:inCategory>},
378        'keyword' => {uri => ExpandedURI q<sw:keyword>, is_list => 1},
379        'license' => {uri => ExpandedURI q<sw:license>,
380                      ExpandedURI q<media-type:media-type-prop>
381                          => ExpandedURI q<sw:license--type>},
382        'license--type' => {uri => ExpandedURI q<sw:license--type>,
383                             type => ExpandedURI q<media-type:media-type>,
384                             depend => [qw/license/]},
385        'obsolete' => {uri => ExpandedURI q<sw:obsolete>, is_list => 1,
386                       type => ExpandedURI q<sw:WikiName>},
387        'rel-contents' => {uri => ExpandedURI q<relrev:contents>, is_list => 1,
388                           type => ExpandedURI q<sw:WikiName>},
389        'rel-index' => {uri => ExpandedURI q<relrev:index>, is_list => 1,
390                        type => ExpandedURI q<sw:WikiName>},
391        'rel-next' => {uri => ExpandedURI q<relrev:next>, is_list => 1,
392                       type => ExpandedURI q<sw:WikiName>,
393                       ExpandedURI q<pe:revWNList> => ExpandedURI q<relrev:prev>},
394        'rel-prev' => {uri => ExpandedURI q<relrev:prev>, is_list => 1,
395                       type => ExpandedURI q<sw:WikiName>,
396                       ExpandedURI q<pe:revWNList> => ExpandedURI q<relrev:next>},
397        'rel-up' => {uri => ExpandedURI q<relrev:up>, is_list => 1,
398                     type => ExpandedURI q<sw:WikiName>,
399                     ExpandedURI q<pe:revWNList> => ExpandedURI q<relrev:down>},
400    
401      ## For BugTrack plugin
402        'bt--status' => {uri => ExpandedURI q<bt:status>},
403        'bt--priority' => {uri => ExpandedURI q<bt:priority>},
404        'bt--category' => {uri => ExpandedURI q<bt:category>, is_list => 1},
405        'bt--subject' => {uri => ExpandedURI q<bt:subject>},
406      };
407    
408    ## -- Debug mode    ## -- Debug mode
409    $WIKI->{config}->{debug} = {    $WIKI->{config}->{debug} = {
410      general => 0,      general => 0,

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.24

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24