]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/inline.pm
table: Support header=column to make the table header be the first column of the...
[git.ikiwiki.info.git] / IkiWiki / Plugin / inline.pm
index cdd0ab0dc2b7cf86ae3b5c7367bd24fe980d2462..d2e58328988e1c87b9232b33925afb722724bf51 100644 (file)
@@ -47,6 +47,10 @@ sub getopt () { #{{{
 
 sub getsetup () { #{{{
        return
 
 sub getsetup () { #{{{
        return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
                rss => {
                        type => "boolean",
                        example => 0,
                rss => {
                        type => "boolean",
                        example => 0,
@@ -182,7 +186,7 @@ sub preprocess_inline (@) { #{{{
        }
 
        if (exists $params{sort} && $params{sort} eq 'title') {
        }
 
        if (exists $params{sort} && $params{sort} eq 'title') {
-               @list=sort @list;
+               @list=sort { pagetitle(basename($a)) cmp pagetitle(basename($b)) } @list;
        }
        elsif (exists $params{sort} && $params{sort} eq 'mtime') {
                @list=sort { $pagemtime{$b} <=> $pagemtime{$a} } @list;
        }
        elsif (exists $params{sort} && $params{sort} eq 'mtime') {
                @list=sort { $pagemtime{$b} <=> $pagemtime{$a} } @list;
@@ -247,7 +251,7 @@ sub preprocess_inline (@) { #{{{
        my $atomurl=basename(atompage($params{destpage}).$feednum) if $feeds && $atom;
        my $ret="";
 
        my $atomurl=basename(atompage($params{destpage}).$feednum) if $feeds && $atom;
        my $ret="";
 
-       if ($config{cgiurl} && ! $params{preview} && (exists $params{rootpage} ||
+       if (length $config{cgiurl} && ! $params{preview} && (exists $params{rootpage} ||
                        (exists $params{postform} && yesno($params{postform})))) {
                # Add a blog post form, with feed buttons.
                my $formtemplate=template("blogpost.tmpl", blind_cache => 1);
                        (exists $params{postform} && yesno($params{postform})))) {
                # Add a blog post form, with feed buttons.
                my $formtemplate=template("blogpost.tmpl", blind_cache => 1);
@@ -575,15 +579,15 @@ sub pingurl (@) { #{{{
                                        $title, $url);
                                my $res = $client->send_request($req);
                                if (! ref $res) {
                                        $title, $url);
                                my $res = $client->send_request($req);
                                if (! ref $res) {
-                                       debug("Did not receive response to ping");
+                                       error("Did not receive response to ping");
                                }
                                my $r=$res->value;
                                if (! exists $r->{flerror} || $r->{flerror}) {
                                }
                                my $r=$res->value;
                                if (! exists $r->{flerror} || $r->{flerror}) {
-                                       debug("Ping rejected: ".(exists $r->{message} ? $r->{message} : "[unknown reason]"));
+                                       error("Ping rejected: ".(exists $r->{message} ? $r->{message} : "[unknown reason]"));
                                }
                        };
                        if ($@) {
                                }
                        };
                        if ($@) {
-                               debug "Ping failed: $@";
+                               error "Ping failed: $@";
                        }
                }
        }
                        }
                }
        }