Code Duplication    Length = 3-3 lines in 8 locations

singlelink.php 8 locations

@@ 95-97 (lines=3) @@
92
if ($xoopsModuleConfig['useaddress'] == 1) {
93
    $link['addryn'] = 1;
94
95
    if ($link_arr['tel'] === true) {
96
        $link['tel'] = '<br>' . '<img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/telephone.png" title="' . _MD_WFL_TELEPHONE . '" alt="' . _MD_WFL_TELEPHONE . '" align="absmiddle">&nbsp;' . $tel;
97
    }
98
99
    if ($link_arr['mobile'] === true) {
100
        $link['mobile'] = '<br>' . '<img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/phone.png" title="' . _MD_WFL_MOBILE . '" alt="' . _MD_WFL_MOBILE . '" align="absmiddle">&nbsp;' . $mobile;
@@ 99-101 (lines=3) @@
96
        $link['tel'] = '<br>' . '<img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/telephone.png" title="' . _MD_WFL_TELEPHONE . '" alt="' . _MD_WFL_TELEPHONE . '" align="absmiddle">&nbsp;' . $tel;
97
    }
98
99
    if ($link_arr['mobile'] === true) {
100
        $link['mobile'] = '<br>' . '<img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/phone.png" title="' . _MD_WFL_MOBILE . '" alt="' . _MD_WFL_MOBILE . '" align="absmiddle">&nbsp;' . $mobile;
101
    }
102
103
    if ($link_arr['voip'] === true) {
104
        $link['voip'] = '<br>' . '<img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/voip.png" title="' . _MD_WFL_VOIP . '" alt="' . _MD_WFL_VOIP . '" align="absmiddle">&nbsp;' . $voip;
@@ 103-105 (lines=3) @@
100
        $link['mobile'] = '<br>' . '<img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/phone.png" title="' . _MD_WFL_MOBILE . '" alt="' . _MD_WFL_MOBILE . '" align="absmiddle">&nbsp;' . $mobile;
101
    }
102
103
    if ($link_arr['voip'] === true) {
104
        $link['voip'] = '<br>' . '<img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/voip.png" title="' . _MD_WFL_VOIP . '" alt="' . _MD_WFL_VOIP . '" align="absmiddle">&nbsp;' . $voip;
105
    }
106
107
    if ($link_arr['fax'] === true) {
108
        $link['fax'] = '<br>' . '<img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/fax.png" title="' . _MD_WFL_FAX . '" alt="' . _MD_WFL_FAX . '" align="absmiddle">&nbsp;' . $fax;
@@ 107-109 (lines=3) @@
104
        $link['voip'] = '<br>' . '<img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/voip.png" title="' . _MD_WFL_VOIP . '" alt="' . _MD_WFL_VOIP . '" align="absmiddle">&nbsp;' . $voip;
105
    }
106
107
    if ($link_arr['fax'] === true) {
108
        $link['fax'] = '<br>' . '<img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/fax.png" title="' . _MD_WFL_FAX . '" alt="' . _MD_WFL_FAX . '" align="absmiddle">&nbsp;' . $fax;
109
    }
110
111
    if ($link_arr['email'] === true) {
112
        $link['email'] = '<br>' . '<img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/email.png" title="' . _MD_WFL_EMAIL . '" alt="' . _MD_WFL_EMAIL . '" align="absmiddle">&nbsp;' . $email;
@@ 111-113 (lines=3) @@
108
        $link['fax'] = '<br>' . '<img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/fax.png" title="' . _MD_WFL_FAX . '" alt="' . _MD_WFL_FAX . '" align="absmiddle">&nbsp;' . $fax;
109
    }
110
111
    if ($link_arr['email'] === true) {
112
        $link['email'] = '<br>' . '<img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/email.png" title="' . _MD_WFL_EMAIL . '" alt="' . _MD_WFL_EMAIL . '" align="absmiddle">&nbsp;' . $email;
113
    }
114
115
    if ($link_arr['vat'] === true) {
116
        $link['vat'] = '<br>' . _MD_WFL_VAT . ':&nbsp;' . $vat;
@@ 132-134 (lines=3) @@
129
    $yahoomap  = $link_arr['yahoomap'];
130
    $mslivemap = $link_arr['multimap'];
131
132
    if ($link_arr['googlemap'] === true) {
133
        $link['googlemap'] = '<a href="' . $googlemap . '" target="_blank"><img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/google_map.png" alt="' . _MD_WFL_GETMAP . '" title="' . _MD_WFL_GETMAP . '" align="absmiddle"></a>&nbsp;';
134
    }
135
136
    if ($link_arr['yahoomap'] === true) {
137
        $link['yahoomap'] = '<a href="' . $yahoomap . '" target="_blank"><img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/yahoo_map.png" alt="' . _MD_WFL_GETMAP . '" title="' . _MD_WFL_GETMAP . '" align="absmiddle"></a>&nbsp;';
@@ 136-138 (lines=3) @@
133
        $link['googlemap'] = '<a href="' . $googlemap . '" target="_blank"><img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/google_map.png" alt="' . _MD_WFL_GETMAP . '" title="' . _MD_WFL_GETMAP . '" align="absmiddle"></a>&nbsp;';
134
    }
135
136
    if ($link_arr['yahoomap'] === true) {
137
        $link['yahoomap'] = '<a href="' . $yahoomap . '" target="_blank"><img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/yahoo_map.png" alt="' . _MD_WFL_GETMAP . '" title="' . _MD_WFL_GETMAP . '" align="absmiddle"></a>&nbsp;';
138
    }
139
140
    if ($link_arr['multimap'] === true) {
141
        $link['multimap'] = '<a href="' . $multimap . '" target="_blank"><img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/multimap.png" alt="' . _MD_WFL_GETMAP . '" title="' . _MD_WFL_GETMAP . '" align="absmiddle"></a>';
@@ 140-142 (lines=3) @@
137
        $link['yahoomap'] = '<a href="' . $yahoomap . '" target="_blank"><img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/yahoo_map.png" alt="' . _MD_WFL_GETMAP . '" title="' . _MD_WFL_GETMAP . '" align="absmiddle"></a>&nbsp;';
138
    }
139
140
    if ($link_arr['multimap'] === true) {
141
        $link['multimap'] = '<a href="' . $multimap . '" target="_blank"><img src="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/images/icon/multimap.png" alt="' . _MD_WFL_GETMAP . '" title="' . _MD_WFL_GETMAP . '" align="absmiddle"></a>';
142
    }
143
}
144
145
$mytree       = new WflinksXoopsTree($xoopsDB->prefix('wflinks_cat'), 'cid', 'pid');