]> sipb.mit.edu Git - ikiwiki.git/commitdiff
bugs
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 26 Nov 2006 20:23:23 +0000 (20:23 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 26 Nov 2006 20:23:23 +0000 (20:23 +0000)
IkiWiki/Plugin/inline.pm
IkiWiki/Plugin/poll.pm

index 890cdb44670db668b0199abb033836829b2188ed..eb9708a8c63a2f5ec56894ab5c3f9a05686b32c6 100644 (file)
@@ -113,7 +113,7 @@ sub preprocess_inline (@) { #{{{
                my $file = $pagesources{$page};
                my $type = pagetype($file);
                if (! $raw || ($raw && ! defined $type)) {
                my $file = $pagesources{$page};
                my $type = pagetype($file);
                if (! $raw || ($raw && ! defined $type)) {
-                       if (! $archive && $quick) {
+                       unless ($archive && $quick) {
                                # Get the content before populating the
                                # template, since getting the content uses
                                # the same template if inlines are nested.
                                # Get the content before populating the
                                # template, since getting the content uses
                                # the same template if inlines are nested.
index b862ccdaacd585c49a334a7578e5aa0cf26bb13d..e92d0292f317d90eee975bcdb6d5aaf995632934 100644 (file)
@@ -45,7 +45,7 @@ sub preprocess (@) { #{{{
 
        my $ret="";
        foreach my $choice (@choices) {
 
        my $ret="";
        foreach my $choice (@choices) {
-               my $percent=int($choices{$choice} / $total * 100);
+               my $percent=$total > 0 ? int($choices{$choice} / $total * 100) : 0;
                if ($percent) {
                        $ret.="$choice ($percent%) ";
                }
                if ($percent) {
                        $ret.="$choice ($percent%) ";
                }