]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Move yesno function out of inline and into IkiWiki core, not exported.
authorJoey Hess <joey@kodama.kitenet.net>
Sat, 12 Jul 2008 16:01:08 +0000 (12:01 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Sat, 12 Jul 2008 16:01:22 +0000 (12:01 -0400)
IkiWiki.pm
IkiWiki/Plugin/inline.pm
IkiWiki/Plugin/poll.pm
debian/changelog

index c1d9119e840662f449d0cd257c0ca1c14df48653..f1a5f8058ec551667027e1af755848f7c11655aa 100644 (file)
@@ -337,7 +337,7 @@ sub readfile ($;$$) { #{{{
        return $ret;
 } #}}}
 
        return $ret;
 } #}}}
 
-sub prep_writefile ($$) {
+sub prep_writefile ($$) { #{{{
        my $file=shift;
        my $destdir=shift;
        
        my $file=shift;
        my $destdir=shift;
        
@@ -361,7 +361,7 @@ sub prep_writefile ($$) {
        }
 
        return 1;
        }
 
        return 1;
-}
+} #}}}
 
 sub writefile ($$$;$$) { #{{{
        my $file=shift; # can include subdirs
 
 sub writefile ($$$;$$) { #{{{
        my $file=shift; # can include subdirs
@@ -1202,6 +1202,12 @@ sub gettext { #{{{
        }
 } #}}}
 
        }
 } #}}}
 
+sub yesno ($) { #{{{
+       my $val=shift;
+
+       return (defined $val && lc($val) eq gettext("yes"));
+} #}}}
+
 sub pagespec_merge ($$) { #{{{
        my $a=shift;
        my $b=shift;
 sub pagespec_merge ($$) { #{{{
        my $a=shift;
        my $b=shift;
index 2dcd1a90ae340bc9ec764fcb4296b63cb19c33a1..02c04cc003e4886414b48afc8e2e60b87f385c9a 100644 (file)
@@ -94,11 +94,6 @@ package IkiWiki;
 my %toping;
 my %feedlinks;
 
 my %toping;
 my %feedlinks;
 
-sub yesno ($) { #{{{
-       my $val=shift;
-       return (defined $val && lc($val) eq "yes");
-} #}}}
-
 sub preprocess_inline (@) { #{{{
        my %params=@_;
        
 sub preprocess_inline (@) { #{{{
        my %params=@_;
        
index 6edf233b4f07e3b7b926a765970bdaed538b75b8..32cb5c48f2ca8156c44a60ff5f1daa2852ffc759 100644 (file)
@@ -11,18 +11,13 @@ sub import { #{{{
        hook(type => "sessioncgi", id => "poll", call => \&sessioncgi);
 } # }}}
 
        hook(type => "sessioncgi", id => "poll", call => \&sessioncgi);
 } # }}}
 
-sub yesno ($) { #{{{
-       my $val=shift;
-       return (defined $val && lc($val) eq "yes");
-} #}}}
-
 my %pagenum;
 sub preprocess (@) { #{{{
        my %params=(open => "yes", total => "yes", percent => "yes", @_);
 
 my %pagenum;
 sub preprocess (@) { #{{{
        my %params=(open => "yes", total => "yes", percent => "yes", @_);
 
-       my $open=yesno($params{open});
-       my $showtotal=yesno($params{total});
-       my $showpercent=yesno($params{percent});
+       my $open=IkiWIki::yesno($params{open});
+       my $showtotal=IkiWiki::yesno($params{total});
+       my $showpercent=IkiWiki::yesno($params{percent});
        $pagenum{$params{page}}++;
 
        my %choices;
        $pagenum{$params{page}}++;
 
        my %choices;
index ea3ba077bcde233e1a66ac3bf6a56b6b8d54bd9d..0694b81907d4afaaeec5e7ef4a3ce19b97e1b712 100644 (file)
@@ -17,6 +17,7 @@ ikiwiki (2.54) UNRELEASED; urgency=low
     numerous bugs.
   * meta: Support a guid option, to allow forcing a particular url or
     uuid in feeds. (smcv)
     numerous bugs.
   * meta: Support a guid option, to allow forcing a particular url or
     uuid in feeds. (smcv)
+  * Move yesno function out of inline and into IkiWiki core, not exported.
 
  -- Josh Triplett <josh@freedesktop.org>  Wed, 09 Jul 2008 21:30:33 -0700
 
 
  -- Josh Triplett <josh@freedesktop.org>  Wed, 09 Jul 2008 21:30:33 -0700