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 ( |
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 |
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; |
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; |
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; |