summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2021-03-23 18:02:20 +0100
committerJonas Smedegaard <dr@jones.dk>2021-03-23 18:02:20 +0100
commit173879081a0058541b54267420fc2d2e5685716e (patch)
tree8f8e5729bb73546c2c07d01654a823ad42fced51 /IkiWiki
parentc73f1cbde0f59287d56bfa603b8fd9a70d7fa2d0 (diff)
sync with ikiwiki 3.20190207ikiwiki
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/meta.pm20
-rw-r--r--IkiWiki/Plugin/osm.pm2
2 files changed, 19 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm
index ea099f9..cd367da 100644
--- a/IkiWiki/Plugin/meta.pm
+++ b/IkiWiki/Plugin/meta.pm
@@ -155,14 +155,30 @@ sub preprocess (@) {
eval q{use Date::Parse};
if (! $@) {
my $time = str2time($value);
- $IkiWiki::pagectime{$page}=$time if defined $time;
+ if (defined $time) {
+ $IkiWiki::pagectime{$page}=$time;
+ }
+ else {
+ error(sprintf(gettext('cannot parse date/time: %s'), $value));
+ }
+ }
+ else {
+ error $@;
}
}
elsif ($key eq 'updated') {
eval q{use Date::Parse};
if (! $@) {
my $time = str2time($value);
- $pagestate{$page}{meta}{updated}=$time if defined $time;
+ if (defined $time) {
+ $pagestate{$page}{meta}{updated}=$time;
+ }
+ else {
+ error(sprintf(gettext('cannot parse date/time: %s'), $value));
+ }
+ }
+ else {
+ error $@;
}
}
diff --git a/IkiWiki/Plugin/osm.pm b/IkiWiki/Plugin/osm.pm
index a5af4ed..27db31a 100644
--- a/IkiWiki/Plugin/osm.pm
+++ b/IkiWiki/Plugin/osm.pm
@@ -233,7 +233,7 @@ sub get_tag_icon($) {
my $tag = shift;
# look for an icon attached to the tag
my $attached = $tag . '/' . $config{'osm_tag_default_icon'};
- if (srcfile($attached)) {
+ if (srcfile($attached, 1)) {
return $attached;
}
else {