]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Revert po vs. template kludges.
authorintrigeri <intrigeri@boum.org>
Sun, 11 Jul 2010 09:00:43 +0000 (11:00 +0200)
committerintrigeri <intrigeri@boum.org>
Sun, 11 Jul 2010 09:03:41 +0000 (11:03 +0200)
IkiWiki.pm
IkiWiki/Plugin/editpage.pm
IkiWiki/Plugin/inline.pm
IkiWiki/Plugin/po.pm
IkiWiki/Plugin/sidebar.pm
IkiWiki/Render.pm
doc/plugins/write.mdwn

index f9a30a202f892232dbbff2cdd32f6c8190b3eb48..cd9c407958e79d971641ce206b8caf64f58a58d1 100644 (file)
@@ -1403,16 +1403,14 @@ sub preprocess ($$$;$$) {
        return $content;
 }
 
-sub filter ($$$;$) {
+sub filter ($$$) {
        my $page=shift;
        my $destpage=shift;
        my $content=shift;
-       my $fullpage=shift;
-       $fullpage = 0 unless defined $fullpage;
 
        run_hooks(filter => sub {
                $content=shift->(page => $page, destpage => $destpage, 
-                       content => $content, fullpage => $fullpage);
+                       content => $content);
        });
 
        return $content;
index 70663020318197396412354be7a9d7462df62e4b..1a04a72b5568f2980d8a7e00d0eaaa06a62e0e0d 100644 (file)
@@ -187,7 +187,7 @@ sub cgi_editpage ($$) {
                my $preview=htmlize($page, $page, $type,
                        linkify($page, $page,
                        preprocess($page, $page,
-                       filter($page, $page, $content, 'fullpage'), 0, 1)));
+                       filter($page, $page, $content), 0, 1)));
                run_hooks(format => sub {
                        $preview=shift->(
                                page => $page,
index a04dd6630b9ee3f01ebc1e0887f656416c860fc8..715a3d6523cfcee4e57c125425d19cfdab110298 100644 (file)
@@ -403,7 +403,7 @@ sub preprocess_inline (@) {
                                              linkify($page, $params{destpage},
                                              preprocess($page, $params{destpage},
                                              filter($page, $params{destpage},
-                                             readfile(srcfile($file)), 'fullpage')));
+                                             readfile(srcfile($file)))));
                                }
                                else {
                                        $ret.="\n".
@@ -474,7 +474,7 @@ sub get_inline_content ($$) {
                       linkify($page, $destpage,
                       preprocess($page, $destpage,
                       filter($page, $destpage,
-                      readfile(srcfile($file)), 'fullpage'))));
+                      readfile(srcfile($file))))));
                $nested--;
                if (isinternal($page)) {
                        # make inlined text of internal pages searchable
index cadc13ba195815c3918727b8bd0e9fb0f8d50916..ecfbb6f782552fe57c51628f5f99058333b6e739 100644 (file)
@@ -259,12 +259,6 @@ sub filter (@) {
        my $page = $params{page};
        my $destpage = $params{destpage};
        my $content = $params{content};
-       my $fullpage = $params{fullpage};
-
-       unless ($fullpage) {
-               return $content;
-       }
-
        if (istranslation($page) && ! alreadyfiltered($page, $destpage)) {
                $content = po_to_markup($page, $content);
                setalreadyfiltered($page, $destpage);
index 100015ceeeeb4f035e165e64713e907ee4d47eb6..2d495db2cc0d02e1bc1abbc3653627374a8179ba 100644 (file)
@@ -89,7 +89,7 @@ sub sidebar_content ($) {
                return IkiWiki::htmlize($sidebar_page, $page, $sidebar_type,
                       IkiWiki::linkify($sidebar_page, $page,
                       IkiWiki::preprocess($sidebar_page, $page,
-                      IkiWiki::filter($sidebar_page, $page, $content, 'fullpage'))));
+                      IkiWiki::filter($sidebar_page, $page, $content))));
        }
 
 }
index 233d093eda602387902cfade75573ee62760a3ed..a653ab2da02e542828349c3d9f3ac200340608f4 100644 (file)
@@ -232,7 +232,7 @@ sub render ($$) {
                        linkify($page, $page,
                        preprocess($page, $page,
                        filter($page, $page,
-                       readfile($srcfile), 'fullpage'))));
+                       readfile($srcfile)))));
                
                my $output=htmlpage($page);
                writefile($output, $config{destdir}, genpage($page, $content));
@@ -837,7 +837,7 @@ sub commandline_render () {
        my $content=readfile($srcfile);
        my $page=pagename($file);
        $pagesources{$page}=$file;
-       $content=filter($page, $page, $content, 'fullpage');
+       $content=filter($page, $page, $content);
        $content=preprocess($page, $page, $content);
        $content=linkify($page, $page, $content);
        $content=htmlize($page, $page, $type, $content);
index 8071f323edae969cee3ef4327f2bf8a2e70cce46..bb80123423453c5d01a558569f48924e05fbba55 100644 (file)
@@ -200,9 +200,7 @@ value is ignored.
 
 Runs on the raw source of a page, before anything else touches it, and can
 make arbitrary changes. The function is passed named parameters "page",
-"destpage", "content" and "fullpage". "fullpage" is a true value if,
-and only if, a full page's content is being filtered, e.g. as opposed
-to a directive parameter. It should return the filtered content.
+"destpage", and "content". It should return the filtered content.
 
 ### preprocess