]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/googlecalendar.pm
* Only try postsignin if no other action matched. Fixes a bug where the
[git.ikiwiki.info.git] / IkiWiki / Plugin / googlecalendar.pm
index c99563d9591f856ed7e01661534733ea812b206e..c6409e5e6db3732e1efd3ea4d5232b5dc66c76be 100644 (file)
@@ -3,13 +3,12 @@ package IkiWiki::Plugin::googlecalendar;
 
 use warnings;
 use strict;
 
 use warnings;
 use strict;
-use IkiWiki;
-use IPC::Open2;
+use IkiWiki 2.00;
 
 sub import { #{{{
 
 sub import { #{{{
-       IkiWiki::hook(type => "preprocess", id => "googlecalendar",
+       hook(type => "preprocess", id => "googlecalendar",
                call => \&preprocess);
                call => \&preprocess);
-       IkiWiki::hook(type => "format", id => "googlecalendar",
+       hook(type => "format", id => "googlecalendar",
                call => \&format);
 } # }}}
 
                call => \&format);
 } # }}}
 
@@ -20,7 +19,7 @@ sub preprocess (@) { #{{{
        # Avoid XSS attacks..
        my ($url)=$params{html}=~m#iframe\s+src="http://www\.google\.com/calendar/embed\?([^"<>]+)"#;
        if (! defined $url || ! length $url) {
        # Avoid XSS attacks..
        my ($url)=$params{html}=~m#iframe\s+src="http://www\.google\.com/calendar/embed\?([^"<>]+)"#;
        if (! defined $url || ! length $url) {
-               return "[[googlecalendar failed to find url in html]]";
+               return "[[googlecalendar ".gettext("failed to find url in html")."]]";
        }
        my ($height)=$params{html}=~m#height="(\d+)"#;
        my ($width)=$params{html}=~m#width="(\d+)"#;
        }
        my ($height)=$params{html}=~m#height="(\d+)"#;
        my ($width)=$params{html}=~m#width="(\d+)"#;