/[pub]/suikawiki/script/misc/plugins/link/map.wp2
Suika

Diff of /suikawiki/script/misc/plugins/link/map.wp2

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

revision 1.2 by wakaba, Sun Feb 8 08:46:47 2004 UTC revision 1.4 by wakaba, Wed Feb 18 07:22:11 2004 UTC
# Line 6  Plugin: Line 6  Plugin:
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
# Line 76  FormattingRule: Line 76  FormattingRule:
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',
# Line 136  FormattingRule: Line 139  FormattingRule:
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,
# Line 162  FormattingRule: Line 168  FormattingRule:
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    
# Line 185  FormattingRule: Line 192  FormattingRule:
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;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24