Code Duplication    Length = 9-9 lines in 2 locations

main/work/work.lib.php 1 location

@@ 2326-2334 (lines=9) @@
2323
 * @param string $checked
2324
 * @return string
2325
 */
2326
function make_select($name, $values, $checked = '')
2327
{
2328
    $output = '<select name="'.$name.'" id="'.$name.'">';
2329
    foreach ($values as $key => $value) {
2330
        $output .= '<option value="'.$key.'" '.(($checked==$key) ? 'selected="selected"' : '').'>'.$value.'</option>';
2331
    }
2332
    $output .= '</select>';
2333
    return $output;
2334
}
2335
2336
/**
2337
 * @param $name

main/wiki/wiki.inc.php 1 location

@@ 2482-2490 (lines=9) @@
2479
     * Draws an HTML form select with the given options
2480
     *
2481
     */
2482
    public function make_select($name,$values,$checked='')
2483
    {
2484
        $output = '<select name="'.$name.'" id="'.$name.'">';
2485
        foreach($values as $key => $value) {
2486
            $output .= '<option value="'.$key.'" '.(($checked==$key)?'selected="selected"':'').'>'.$value.'</option>';
2487
        }
2488
        $output .= '</select>';
2489
        return $output;
2490
    }
2491
2492
    /**
2493
     * Translates a form date into a more usable format