Code Duplication    Length = 18-18 lines in 2 locations

xoops_trust_path/libs/altsys/class/MyBlocksAdminForICMS.class.php 1 location

@@ 95-112 (lines=18) @@
92
93
94
// private
95
public function renderRadio4BlockPosition($target_side, $block_data)
96
{
97
    $bid = (int)$block_data['bid'];
98
    $visible = (int)$block_data['visible'];
99
    $current_side = $visible ? (int)$block_data['side'] : -1 ;
100
101
    $label4disp = htmlspecialchars($this->block_positions[ $target_side ], ENT_QUOTES) ;
102
103
    if ($current_side == $target_side) {
104
        $checked = "checked='checked'" ;
105
        $divstyle = $target_side == -1 ? 'disabled' : 'selected';
106
    } else {
107
        $checked = '';
108
        $divstyle = 'unselected';
109
    }
110
111
    return "<div class='blockposition $divstyle' title='$label4disp'><input type='radio' name='sides[$bid]' value='$target_side' class='blockposition' $checked /></div>" ;
112
}
113
114
115
// private

xoops_trust_path/libs/altsys/class/MyBlocksAdminForX20S.class.php 1 location

@@ 72-89 (lines=18) @@
69
70
71
// private
72
public function renderRadio4BlockPosition($target_side, $block_data)
73
{
74
    $bid = (int)$block_data['bid'];
75
    $visible = (int)$block_data['visible'];
76
    $current_side = $visible ? (int)$block_data['side'] : -1 ;
77
78
    $label4disp = htmlspecialchars($this->block_positions[ $target_side ], ENT_QUOTES) ;
79
80
    if ($current_side == $target_side) {
81
        $checked = "checked='checked'" ;
82
        $divstyle = $target_side == -1 ? 'disabled' : 'selected';
83
    } else {
84
        $checked = '';
85
        $divstyle = 'unselected';
86
    }
87
88
    return "<div class='blockposition $divstyle' title='$label4disp'><input type='radio' name='sides[$bid]' value='$target_side' class='blockposition' $checked /></div>" ;
89
}
90
}
91