X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=format.php;h=0fbc88fe6ffcf24698735db7dadcefa85c781fbf;hb=58634c046869454b074417a80cf5e35761ec9e8e;hp=85a90a228805d3df90c544aeb0b5178d7d4586c7;hpb=d0e10623d1c7660c216a1bc5a1050b4507ff560f;p=wfpl.git diff --git a/format.php b/format.php index 85a90a2..0fbc88f 100644 --- a/format.php +++ b/format.php @@ -24,22 +24,6 @@ function format_caption($str) { return str_replace('Email', 'E-mail', $str); } -# This function makes sure that $str is in the list of options, and returns "" otherwise -function format_options($str, $name) { - if(!isset($GLOBALS[$name . '_options'])) { - die("Couldn't find options for \"$name\". Be sure to call pulldown()."); - } - - foreach($GLOBALS[$name . '_options']['options'] as $keyval) { - list($key, $value) = $keyval; - if($str == $key) { - return $str; - } - } - - return $str; -} - function format_int($str) { $str = ereg_replace('[^0-9]', '', $str); return ereg_replace('^0*([0-9])', '\1', $str); @@ -292,6 +276,7 @@ function format_dollars($str) { # date is edited as mm/dd/yyyy but stored as yyyy-mm-dd function format_mdy_to_ymd($str) { + if($str == '') return ''; require_once('code/wfpl/time.php'); return mdy_to_ymd(format_oneline($str)); }