JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fixed enc_checked to work with new int-based checkbox
authorJason <jason@parth.(none)>
Mon, 15 Sep 2008 21:45:26 +0000 (17:45 -0400)
committerJason <jason@parth.(none)>
Mon, 15 Sep 2008 21:45:26 +0000 (17:45 -0400)
encode.php

index d37d1fa..6d386b3 100644 (file)
@@ -99,7 +99,7 @@ function enc_url_path($str) {
 #
 # Example: <input type="checkbox" name="foo~foo.checked~">
 function enc_checked($str) {
-       if($str == 'Yes') {
+       if($str && $str !== 'No' && $str !== 'False' && $str !== 'false') {
                return '" checked="checked';
        } else {
                return '';