Code Duplication    Length = 13-13 lines in 2 locations

main/inc/lib/display.lib.php 2 locations

@@ 643-655 (lines=13) @@
640
     * @todo This is English language specific implementation.
641
     * It should be adapted for the other languages.
642
     */
643
    public static function get_alphabet_options($selected_letter = '')
644
    {
645
        $result = '';
646
        for ($i = 65; $i <= 90; $i ++) {
647
            $letter = chr($i);
648
            $result .= '<option value="'.$letter.'"';
649
            if ($selected_letter == $letter) {
650
                $result .= ' selected="selected"';
651
            }
652
            $result .= '>'.$letter.'</option>';
653
        }
654
        return $result;
655
    }
656
657
    /**
658
     * Get the options withing a select box within the given values
@@ 664-676 (lines=13) @@
661
     * @param int   Default value
662
     * @return string HTML select options
663
     */
664
    public static function get_numeric_options($min, $max, $selected_num = 0)
665
    {
666
        $result = '';
667
        for ($i = $min; $i <= $max; $i ++) {
668
            $result .= '<option value="'.$i.'"';
669
            if (is_int($selected_num))
670
                if ($selected_num == $i) {
671
                    $result .= ' selected="selected"';
672
                }
673
            $result .= '>'.$i.'</option>';
674
        }
675
        return $result;
676
    }
677
678
    /**
679
     * This public function displays an icon