Code Duplication    Length = 22-22 lines in 2 locations

blocks/xhp_block_completed.php 1 location

@@ 66-87 (lines=22) @@
63
 * @param $options
64
 * @return string
65
 */
66
function b_XHP_completed_edit($options)
67
{
68
    $form = _MB_XHP_ITEMS_ORDER . "&nbsp;<select name='options[]'>";
69
    $form .= "<option value='DESC'";
70
    if ($options[0] === 'DESC') {
71
        $form .= " selected='selected'";
72
    }
73
    $form .= '>' . _MB_XHP_ITEMS_DESC . "</option>\n";
74
    $form .= "<option value=''";
75
    if ($options[0] === '') {
76
        $form .= " selected='selected'";
77
    }
78
    $form .= '>' . _MB_XHP_ITEMS_ASCEND . "</option>\n";
79
    $form .= "</select>\n";
80
    $form .= '&nbsp;' . _MB_XHP_ITEMS_DISP . "&nbsp;<input type='text'  size=5 name='options[]' value='" . $options[1] . "' />&nbsp;" . _MB_XHP_ITEMS_ARTCLS . "<br>\n";
81
    $form .= '&nbsp;' . _MB_XHP_MINIMUM . "&nbsp;<input type='text'  size=5 name='options[]' value='" . $options[2] . "' />&nbsp; " . _MB_XHP_ITEMS_ARTCLS;
82
    $form .= "<input type='hidden' name='options[]' value='" . $options[3] . "'>";
83
84
    return $form;
85
}
86

blocks/xhp_block_ranking.php 1 location

@@ 66-87 (lines=22) @@
63
 * @param $options
64
 * @return string
65
 */
66
function b_XHP_ranking_edit($options)
67
{
68
    $form = _MB_XHP_ITEMS_ORDER . "&nbsp;<select name='options[]'>";
69
    $form .= "<option value='DESC'";
70
    if ($options[0] === 'DESC') {
71
        $form .= " selected='selected'";
72
    }
73
    $form .= '>' . _MB_XHP_ITEMS_DESC . "</option>\n";
74
    $form .= "<option value=''";
75
    if ($options[0] === '') {
76
        $form .= " selected='selected'";
77
    }
78
    $form .= '>' . _MB_XHP_ITEMS_ASCEND . "</option>\n";
79
    $form .= "</select>\n";
80
    $form .= '&nbsp;' . _MB_XHP_ITEMS_DISP . "&nbsp;<input type='text' size=5 name='options[]' value='" . $options[1] . "' />&nbsp;" . _MB_XHP_ITEMS_ARTCLS . "<br>\n";
81
    $form .= '&nbsp;' . _MB_XHP_MINIMUM . "&nbsp;<input type='text' size=5 name='options[]' value='" . $options[2] . "' />&nbsp; %";
82
    $form .= "<input type='hidden' name='options[]' value='" . $options[3] . "'>";
83
84
    return $form;
85
}
86