6 |
@@@: |
@@@: |
7 |
Visualization of page to page relatinships |
Visualization of page to page relatinships |
8 |
@@lang:en |
@@lang:en |
9 |
@License: %%GPL%% |
@License: %%Perl%% |
10 |
@Author: |
@Author: |
11 |
@@Name: |
@@Name: |
12 |
@@@@: Wakaba |
@@@@: Wakaba |
76 |
__ATTRTEXT:%mode__; |
__ATTRTEXT:%mode__; |
77 |
for (sort {$b->[1] <=> $a->[1]} |
for (sort {$b->[1] <=> $a->[1]} |
78 |
map { try { [$_, $o->{wiki}->{db}->get (lastmodified => $_)] } |
map { try { [$_, $o->{wiki}->{db}->get (lastmodified => $_)] } |
79 |
catch SuikaWiki::DB::Util::Error with {[$_, undef]} } |
catch SuikaWiki::DB::Util::Error with { |
80 |
|
my $err = shift; |
81 |
|
$err->throw if $err->{-type} eq 'ERROR_REPORTED'; |
82 |
|
[$_, undef]} } |
83 |
$o->{wiki}->{db}->keys ('content', |
$o->{wiki}->{db}->keys ('content', |
84 |
-ns => $ns, |
-ns => $ns, |
85 |
-type => 'key', |
-type => 'key', |
139 |
$p->{template} ||= $WIKIRESOURCE->get |
$p->{template} ||= $WIKIRESOURCE->get |
140 |
(name => 'Link:toWikiPage:SourceLabelLong:PageList', |
(name => 'Link:toWikiPage:SourceLabelLong:PageList', |
141 |
wiki => $o->{wiki}, o => $o); |
wiki => $o->{wiki}, o => $o); |
142 |
|
__ATTRTEXT:%match__; ## WARNING: This parameter might be dangerous! |
143 |
|
my $reg = $p->{match} ? qr/$p->{match}/ : qr/./; |
144 |
__ATTRTEXT:%mode__; |
__ATTRTEXT:%mode__; |
145 |
try { |
try { |
146 |
for (sort {$a->[1] cmp $b->[1]} |
for (sort {$a->[1] cmp $b->[1]} |
147 |
|
grep {$_->[1] =~ /$reg/} |
148 |
map {[$_, join '//', @{$_}]} # make sort key |
map {[$_, join '//', @{$_}]} # make sort key |
149 |
$o->{wiki}->{db}->keys ('content', |
$o->{wiki}->{db}->keys ('content', |
150 |
-ns => $ns, |
-ns => $ns, |
168 |
}); |
}); |
169 |
} |
} |
170 |
} catch SuikaWiki::DB::Util::Error with { |
} catch SuikaWiki::DB::Util::Error with { |
171 |
# |
my $err = shift; |
172 |
|
$err->throw if $err->{-type} eq 'ERROR_REPORTED'; |
173 |
}; |
}; |
174 |
$p->{-parent}->remove_child_node ($list) unless $list->count; |
$p->{-parent}->remove_child_node ($list) unless $list->count; |
175 |
|
|
192 |
try { |
try { |
193 |
$content = $o->{wiki}->{db}->get (content => $page); |
$content = $o->{wiki}->{db}->get (content => $page); |
194 |
} catch SuikaWiki::DB::Util::Error with { |
} catch SuikaWiki::DB::Util::Error with { |
195 |
|
my $err = shift; |
196 |
|
$err->throw if $err->{-type} eq 'ERROR_REPORTED'; |
197 |
$content = undef; |
$content = undef; |
198 |
}; |
}; |
199 |
$content = $p->{case_sensible} ? $content : lc $content; |
$content = $p->{case_sensible} ? $content : lc $content; |