]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/inline.pm
Merge branch 'master' into commentreorg
[git.ikiwiki.info.git] / IkiWiki / Plugin / inline.pm
index 95fe9031256f3050c0902932b91e7b1e0e9570a5..715a3d6523cfcee4e57c125425d19cfdab110298 100644 (file)
@@ -358,10 +358,11 @@ sub preprocess_inline (@) {
                                $template->param(pageurl => urlto($page, $params{destpage}));
                                $template->param(inlinepage => $page);
                                $template->param(title => pagetitle(basename($page)));
                                $template->param(pageurl => urlto($page, $params{destpage}));
                                $template->param(inlinepage => $page);
                                $template->param(title => pagetitle(basename($page)));
-                               $template->param(ctime => displaytime($pagectime{$page}, $params{timeformat}));
+                               $template->param(ctime => displaytime($pagectime{$page}, $params{timeformat}, 1));
                                $template->param(mtime => displaytime($pagemtime{$page}, $params{timeformat}));
                                $template->param(first => 1) if $page eq $list[0];
                                $template->param(last => 1) if $page eq $list[$#list];
                                $template->param(mtime => displaytime($pagemtime{$page}, $params{timeformat}));
                                $template->param(first => 1) if $page eq $list[0];
                                $template->param(last => 1) if $page eq $list[$#list];
+                               $template->param(html5 => $config{html5});
        
                                if ($actions) {
                                        my $file = $pagesources{$page};
        
                                if ($actions) {
                                        my $file = $pagesources{$page};
@@ -475,6 +476,13 @@ sub get_inline_content ($$) {
                       filter($page, $destpage,
                       readfile(srcfile($file))))));
                $nested--;
                       filter($page, $destpage,
                       readfile(srcfile($file))))));
                $nested--;
+               if (isinternal($page)) {
+                       # make inlined text of internal pages searchable
+                       run_hooks(indexhtml => sub {
+                               shift->(page => $page, destpage => $page,
+                                       content => $ret);
+                       });
+               }
        }
        
        if ($cached_destpage ne $destpage) {
        }
        
        if ($cached_destpage ne $destpage) {
@@ -500,16 +508,6 @@ sub date_822 ($) {
        return $ret;
 }
 
        return $ret;
 }
 
-sub date_3339 ($) {
-       my $time=shift;
-
-       my $lc_time=POSIX::setlocale(&POSIX::LC_TIME);
-       POSIX::setlocale(&POSIX::LC_TIME, "C");
-       my $ret=POSIX::strftime("%Y-%m-%dT%H:%M:%SZ", gmtime($time));
-       POSIX::setlocale(&POSIX::LC_TIME, $lc_time);
-       return $ret;
-}
-
 sub absolute_urls ($$) {
        # sucky sub because rss sucks
        my $content=shift;
 sub absolute_urls ($$) {
        # sucky sub because rss sucks
        my $content=shift;