]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
add plugin safe/rebuild info (part 3 of 3)
authorJoey Hess <joey@kodama.kitenet.net>
Sun, 3 Aug 2008 23:35:35 +0000 (19:35 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Sun, 3 Aug 2008 23:36:11 +0000 (19:36 -0400)
22 files changed:
IkiWiki/Plugin/attachment.pm
IkiWiki/Plugin/shortcut.pm
IkiWiki/Plugin/sidebar.pm
IkiWiki/Plugin/signinedit.pm
IkiWiki/Plugin/skeleton.pm.example
IkiWiki/Plugin/smiley.pm
IkiWiki/Plugin/sparkline.pm
IkiWiki/Plugin/svn.pm
IkiWiki/Plugin/table.pm
IkiWiki/Plugin/tag.pm
IkiWiki/Plugin/template.pm
IkiWiki/Plugin/testpagespec.pm
IkiWiki/Plugin/teximg.pm
IkiWiki/Plugin/textile.pm
IkiWiki/Plugin/tla.pm
IkiWiki/Plugin/toc.pm
IkiWiki/Plugin/toggle.pm
IkiWiki/Plugin/txt.pm
IkiWiki/Plugin/typography.pm
IkiWiki/Plugin/version.pm
IkiWiki/Plugin/websetup.pm
IkiWiki/Plugin/wikitext.pm

index 404ca07fa4fca244c9a34d6d7af50750e62337de..b81870ffb0ccef5711882f7d4dd045de3b6bff96 100644 (file)
@@ -18,13 +18,6 @@ sub getsetup () { #{{{
                        safe => 1,
                        rebuild => 0,
                },
-               virus_checker => {
-                       type => "string",
-                       example => "clamdscan -",
-                       description => "virus checker program (reads STDIN, returns nonzero if virus found)",
-                       safe => 0, # executed
-                       rebuild => 0,
-               },
                allowed_attachments => {
                        type => "pagespec",
                        example => "virusfree() and mimetype(image/*) and maxsize(50kb)",
@@ -33,6 +26,13 @@ sub getsetup () { #{{{
                        safe => 1,
                        rebuild => 0,
                },
+               virus_checker => {
+                       type => "string",
+                       example => "clamdscan -",
+                       description => "virus checker program (reads STDIN, returns nonzero if virus found)",
+                       safe => 0, # executed
+                       rebuild => 0,
+               },
 } #}}}
 
 sub check_canattach ($$;$) { #{{{
index dfc3cd7c7b3a68a1df29d9d183400e535ea86e0a..7bfce586f5b7a920e7ed8020e6e0becef623b991 100644 (file)
@@ -6,10 +6,19 @@ use strict;
 use IkiWiki 2.00;
 
 sub import { #{{{
+       hook(type => "getsetup", id => "shortcut", call => \&getsetup);
        hook(type => "refresh", id => "shortcut", call => \&refresh);
        hook(type => "preprocess", id => "shortcut", call => \&preprocess_shortcut);
 } #}}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+} #}}}
+
 sub refresh () { #{{{
        # Preprocess the shortcuts page to get all the available shortcuts
        # defined before other pages are rendered.
index 7c2e6e1f680a28561cf0282f0ff631afd76b034b..9697e1198d24db690cec373e9980516e077ad936 100644 (file)
@@ -9,9 +9,18 @@ use strict;
 use IkiWiki 2.00;
 
 sub import { #{{{
+       hook(type => "getsetup", id => "sidebar", call => \&getsetup);
        hook(type => "pagetemplate", id => "sidebar", call => \&pagetemplate);
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => 1,
+               },
+} #}}}
+
 sub sidebar_content ($) { #{{{
        my $page=shift;
        
index 84ab3a4d0cbc7777b8df2b5b8c62cb0f0b94a9c9..ef7b9b428029f57687da3538a52b2ab75727c6ad 100644 (file)
@@ -6,10 +6,19 @@ use strict;
 use IkiWiki 2.00;
 
 sub import { #{{{
+       hook(type => "getsetup", id => "signinedit", call => \&getsetup);
        hook(type => "canedit", id => "signinedit", call => \&canedit,
             last => 1);
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => 0,
+               },
+} #}}}
+
 sub canedit ($$$) { #{{{
        my $page=shift;
        my $cgi=shift;
index bbf11e603839a24f787f0f2ec02ac0f7774f9235..7878d7c2b09a7eda151d22f07e9da107a1b60154 100644 (file)
@@ -42,6 +42,10 @@ sub getopt () { #{{{
 
 sub getsetup () { #{{{
        return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
                skeleton => {
                        type => "boolean",
                        example => 0,
index 50f2686277afa2de60ef86bd88a870938f1c96e4..7a9026025ed94f778aa4b6e666677b27595f605b 100644 (file)
@@ -10,9 +10,20 @@ my $smiley_regexp;
 
 sub import { #{{{
        add_underlay("smiley");
+       hook(type => "getsetup", id => "smiley", call => \&getsetup);
        hook(type => "sanitize", id => "smiley", call => \&sanitize);
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       # force a rebuild because turning it off
+                       # removes the smileys, which would break links
+                       rebuild => 1,
+               },
+} #}}}
+
 sub build_regexp () { #{{{
        my $list=readfile(srcfile("smileys.mdwn"));
        while ($list =~ m/^\s*\*\s+\\\\([^\s]+)\s+\[\[([^]]+)\]\]/mg) {
index bcff46aeb47ed8156b8d866f348ffab29a7a0f23..901c2f6830548c9e23c8e24831666b44d6257bc5 100644 (file)
@@ -15,9 +15,18 @@ my %locmap=(
 );
 
 sub import { #{{{
+       hook(type => "getsetup", id => "sparkline", call => \&getsetup);
        hook(type => "preprocess", id => "sparkline", call => \&preprocess);
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+} #}}}
+
 sub preprocess (@) { #{{{
        my %params=@_;
 
index c51b0f1811a0e528ae962686cb68daff2e92922f..d738720be655a7c2140c7cdb14ff9548dd8f6552 100644 (file)
@@ -41,6 +41,10 @@ sub checkconfig () { #{{{
 
 sub getsetup () { #{{{
        return
+               plugin => {
+                       safe => 0, # rcs plugin
+                       rebuild => undef,
+               },
                svnrepo => {
                        type => "string",
                        example => "/svn/wiki",
index 892ea182e267229531db7e6b64a4067a6294b6a1..1302646b130084fefd87456d2f905b8c4c2cfea6 100644 (file)
@@ -7,9 +7,18 @@ use Encode;
 use IkiWiki 2.00;
 
 sub import { #{{{
+       hook(type => "getsetup", id => "table", call => \&getsetup);
        hook(type => "preprocess", id => "table", call => \&preprocess);
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+} #}}}
+
 sub preprocess (@) { #{{{
        my %params =(
                format  => 'auto',
index 36b434f675c5d0303aa9bd4962bd7302e85afdd0..74d187cd2d8e132756e9c2f4666b73a0b519510d 100644 (file)
@@ -25,6 +25,10 @@ sub getopt () { #{{{
 
 sub getsetup () { #{{{
        return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
                tagbase => {
                        type => "string",
                        example => "tag",
index c33dbbb83b8d1623ffd1348667247ec3be04f082..a2859b2a99864ddb0e9d33cea8106b46ffbc8775 100644 (file)
@@ -9,9 +9,18 @@ use HTML::Template;
 use Encode;
 
 sub import { #{{{
+       hook(type => "getsetup", id => "template", call => \&getsetup);
        hook(type => "preprocess", id => "template", call => \&preprocess);
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+} #}}}
+
 sub preprocess (@) { #{{{
        my %params=@_;
 
index 4faef7be197a8b20362132521ae67de2976a3ad8..9f9b50f017bb5cb75a5ed1155984531d082d200d 100644 (file)
@@ -6,9 +6,18 @@ use strict;
 use IkiWiki 2.00;
 
 sub import { #{{{
+       hook(type => "getsetup", id => "testpagespec", call => \&getsetup);
        hook(type => "preprocess", id => "testpagespec", call => \&preprocess);
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+} #}}}
+
 sub preprocess (@) { #{{{
        my %params=@_;
        
index 6a6bdd4fa404739789eadd065cad4c8c34e4082f..369c1088203cb2ec86e397bd46e9a98e1a4e544d 100644 (file)
@@ -11,9 +11,18 @@ use HTML::Entities;
 use IkiWiki 2.00;
 
 sub import { #{{{
+       hook(type => "getsetup", id => "teximg", call => \&getsetup);
        hook(type => "preprocess", id => "teximg", call => \&preprocess);
 } #}}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+} #}}}
+
 sub preprocess (@) { #{{{
        my %params = @_;
        
index 208f295d2b16aeb37c4434253c46d48d66057222..bbd282f0c8dd09035f03eadc85fbd3ea0823cf7a 100644 (file)
@@ -10,9 +10,18 @@ use IkiWiki 2.00;
 use Encode;
 
 sub import { #{{{
+       hook(type => "getsetup", id => "textile", call => \&getsetup);
        hook(type => "htmlize", id => "txtl", call => \&htmlize);
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => 1, # format plugin
+               },
+} #}}}
+
 sub htmlize (@) { #{{{
        my %params=@_;
        my $content = decode_utf8(encode_utf8($params{content}));
index 1c2763359c35766b8cd42dfb323fbb13ee6e0e11..0a5c161b25e32c74bee0c14f538cc98d85375a0a 100644 (file)
@@ -31,6 +31,10 @@ sub checkconfig () { #{{{
 
 sub getsetup () { #{{{
        return
+               plugin => {
+                       safe => 0, # rcs plugin
+                       rebuild => undef,
+               },
                tla_wrapper => {
                        type => "string",
                        #example => "", # TODO example
index 639cae4a90e88d437824f51689824fa1b30e95ca..dff9d9aa5356e5928de0a9ddd654217f2165af84 100644 (file)
@@ -8,10 +8,19 @@ use IkiWiki 2.00;
 use HTML::Parser;
 
 sub import { #{{{
+       hook(type => "getsetup", id => "toc", call => \&getsetup);
        hook(type => "preprocess", id => "toc", call => \&preprocess);
        hook(type => "format", id => "toc", call => \&format);
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+} #}}}
+
 my %tocpages;
 
 sub preprocess (@) { #{{{
index e203defb09f602f462ceac269d6742651691802c..610d38e3ac0d8e39c43d56e727f098441862b5ce 100644 (file)
@@ -60,6 +60,7 @@ function getElementsByClass(cls, node, tag) {
 EOF
 
 sub import { #{{{
+       hook(type => "getsetup", id => "toggle", call => \&getsetup);
        hook(type => "preprocess", id => "toggle",
                call => \&preprocess_toggle);
        hook(type => "preprocess", id => "toggleable",
@@ -67,6 +68,14 @@ sub import { #{{{
        hook(type => "format", id => "toggle", call => \&format);
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+} #}}}
+
 sub genid ($$) { #{{{
        my $page=shift;
        my $id=shift;
index 3aad5fa07a6aa3a349fab19ba7b182fe667f60ca..e4c9e5d6a086ba59d0a826c0e7378e297454d734 100644 (file)
@@ -14,7 +14,8 @@ use HTML::Entities;
 my $findurl=0;
 
 sub import {
-       hook(type => "filter",  id => "txt", call => \&filter);
+       hook(type => "getsetup", id => "txt", call => \&getsetup);
+       hook(type => "filter", id => "txt", call => \&filter);
        hook(type => "htmlize", id => "txt", call => \&htmlize);
 
        eval q{use URI::Find};
@@ -23,6 +24,14 @@ sub import {
        }
 }
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => 1, # format plugin
+               },
+} #}}}
+
 # We use filter to convert raw text to HTML
 # (htmlize is called after other plugins insert HTML)
 sub filter (@) {
index 3964d266ddaeccb28a11e3f0854dc700b674ec6f..27089b39008455b92b24e69669627bc624fbf10d 100644 (file)
@@ -24,6 +24,10 @@ sub getsetup () { #{{{
        error($@) if $@;
 
        return
+               plugin => {
+                       safe => 1,
+                       rebuild => 1,
+               },
                typographyattributes => {
                        type => "string",
                        example => "3",
index f96d2df06ce345d9939c356637e6e6d0e2d06e8b..18e9613aee76fd51e04681128af8646dab916963 100644 (file)
@@ -7,10 +7,19 @@ use strict;
 use IkiWiki 2.00;
 
 sub import { #{{{
+       hook(type => "getsetup", id => "version", call => \&getsetup);
        hook(type => "needsbuild", id => "version", call => \&needsbuild);
        hook(type => "preprocess", id => "version", call => \&preprocess);
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+} #}}}
+
 sub needsbuild (@) { #{{{
        my $needsbuild=shift;
        foreach my $page (keys %pagestate) {
index 47715b85918c3650bd2b7816373e2c2071c6bf97..da2551489c2dd9dce0f4901865db94f56715fe18 100644 (file)
@@ -15,6 +15,10 @@ sub import { #{{{
 
 sub getsetup () { #{{{
        return
+               plugin => {
+                       safe => 1,
+                       rebuild => 0,
+               },
                websetup_force_plugins => {
                        type => "string",
                        example => [],
index e1d346ae67d19962fc732759e540c17776d8f2a6..c47ccb7b1aded4ea75f096122a39000bda34cdd1 100644 (file)
@@ -7,9 +7,19 @@ use strict;
 use IkiWiki 2.00;
 
 sub import { #{{{
+       hook(type => "getsetup", id => "wiki", call => \&getsetup);
        hook(type => "htmlize", id => "wiki", call => \&htmlize);
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 0, # format plugin
+                       rebuild => undef,
+               },
+} #}}}
+
+
 sub htmlize (@) { #{{{
        my %params=@_;
        my $content = $params{content};