diff options
author | Jonas Smedegaard <dr@jones.dk> | 2021-03-23 18:02:20 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2021-03-23 18:02:20 +0100 |
commit | 173879081a0058541b54267420fc2d2e5685716e (patch) | |
tree | 8f8e5729bb73546c2c07d01654a823ad42fced51 /IkiWiki | |
parent | c73f1cbde0f59287d56bfa603b8fd9a70d7fa2d0 (diff) |
sync with ikiwiki 3.20190207ikiwiki
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/meta.pm | 20 | ||||
-rw-r--r-- | IkiWiki/Plugin/osm.pm | 2 |
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 { |