X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=format.php;h=055e66d6eaa6234f83803d194799188fb1d17865;hb=74fac1cb550d6a337c67cabdcfae4ad26e34f422;hp=1bac60910ffdebe9cd4fa37439365549a9bf6e77;hpb=848c8a4d215f9cce1db0a7d37e733b5959b8210f;p=wfpl.git diff --git a/format.php b/format.php index 1bac609..055e66d 100644 --- a/format.php +++ b/format.php @@ -33,7 +33,7 @@ function format_zip($str) { function format_filename($str) { $str = strtolower($str); $str = ereg_replace('[^a-z0-9_.-]', '_', $str); - return ereg_replace('^[0-9.-]*', '', $str); + return ereg_replace('^[.-]', '_', $str); } function format_varname($str) { @@ -52,10 +52,10 @@ function format_unix($str) { } function format_yesno($str) { - if($str) { - return "Yes"; + if($str && $str != 'No') { + return 'Yes'; } else { - return "No"; + return 'No'; } }