JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
API CHANGE: removed format_options() (unused?)
authorJason Woofenden <jason@jasonwoof.com>
Mon, 25 Apr 2011 05:22:38 +0000 (01:22 -0400)
committerJason Woofenden <jason@jasonwoof.com>
Mon, 25 Apr 2011 05:22:38 +0000 (01:22 -0400)
This was used it obsolete unit tests.

There is now a very similar function enc_pulled()

format.php

index a6b0582..0fbc88f 100644 (file)
@@ -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 '';
-}
-
 function format_int($str) {
        $str = ereg_replace('[^0-9]', '', $str);
        return ereg_replace('^0*([0-9])', '\1', $str);