summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/inline.pm5
-rw-r--r--IkiWiki/Plugin/po.pm4
2 files changed, 5 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 715a3d652..20c5f3bdd 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -570,9 +570,9 @@ sub genfeed ($$$$$@) {
}
}
+ my $file=$pagesources{$p};
+ my $type=pagetype($file);
if ($itemtemplate->query(name => "enclosure")) {
- my $file=$pagesources{$p};
- my $type=pagetype($file);
if (defined $type) {
$itemtemplate->param(content => $pcontent);
}
@@ -591,6 +591,7 @@ sub genfeed ($$$$$@) {
}
}
else {
+ next unless defined $type;
$itemtemplate->param(content => $pcontent);
}
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index ab39cca12..a79e7d7f0 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -1249,8 +1249,8 @@ sub splitlangpair ($) {
if (! defined $code || ! defined $name ||
! length $code || ! length $name) {
# not a fatal error to avoid breaking if used with web setup
- print STDERR sprintf(gettext("%s has invalid syntax: must use CODE|NAME"),
- $pair)."\n";
+ warn sprintf(gettext("%s has invalid syntax: must use CODE|NAME"),
+ $pair);
}
return $code, $name;