Code Duplication    Length = 5-5 lines in 4 locations

index.php 1 location

@@ 137-141 (lines=5) @@
134
    $itemPath    = "<a href='" . XOOPSMYLINKURL . "/viewcat.php?cid={$cid}'>" . $thisCatObj->getVar('title') . '</a>';
135
    $path       = '';
136
    $myParentID = $thisCatObj->getVar('pid');
137
    while ( $myParentID != 0 ) {
138
        $ancestorObj = $myCatTree->getByKey($myParentID);
139
        $path  = "<a href='" . XOOPSMYLINKURL . '/viewcat.php?cid=' . $ancestorObj->getVar('cid') . "'>" . $ancestorObj->getVar('title') . "</a>&nbsp;:&nbsp;{$path}";
140
        $myParentID = $ancestorObj->getVar('pid');
141
    }
142
143
    $path = "{$homePath}{$path}{$itemPath}";
144
    $path = str_replace('&nbsp;:&nbsp;', " <img src='" . mylinksGetIconURL('arrow.gif') . "' style='border-width: 0px;' alt=''> ", $path);

topten.php 1 location

@@ 111-115 (lines=5) @@
108
            $itemPath   = "<a href='" . XOOPSMYLINKURL . "/viewcat.php?cid={$lcid}'>" . $thisCatObj->getVar('title') . '</a>';
109
            $path       = '';
110
            $myParent = $thisCatObj->getVar('pid');
111
            while ( $myParent != 0 ) {
112
                $ancestorObj = $myCatTree->getByKey($myParent);
113
                $path  = "<a href='" . XOOPSMYLINKURL . '/viewcat.php?cid=' . $ancestorObj->getVar('cid') . "'>" . $ancestorObj->getVar('title') . "</a>&nbsp;:&nbsp;{$path}";
114
                $myParent = $ancestorObj->getVar('pid');
115
            }
116
            $path = "{$path}{$itemPath}";
117
            $path = str_replace('&nbsp;:&nbsp;', " <img src='" . mylinksGetIconURL('arrow.gif') . "' style='border-width: 0px;' alt=''> ", $path);
118

viewcat.php 2 locations

@@ 98-102 (lines=5) @@
95
    $itemPath   = $catObj->getVar('title');
96
    $path       = '';
97
    $myParent = $catObj->getVar('pid');
98
    while ( $myParent != 0 ) {
99
        $ancestorObj = $myCatTree->getByKey($myParent);
100
        $path  = "<a href='" . XOOPSMYLINKURL . '/viewcat.php?cid=' . $ancestorObj->getVar('cid') . "'>" . $ancestorObj->getVar('title') . "</a>&nbsp;:&nbsp;{$path}";
101
        $myParent = $ancestorObj->getVar('pid');
102
    }
103
104
    $path = "{$homePath}{$path}{$itemPath}";
105
    $path = str_replace('&nbsp;:&nbsp;', " <img src='" . mylinksGetIconURL('arrow.gif') . "' style='border-width: 0px;' alt=''> ", $path);
@@ 231-235 (lines=5) @@
228
        $itemPath   = $thisCatObj->getVar('title');
229
        $path       = '';
230
        $myParent = $thisCatObj->getVar('pid');
231
        while ( $myParent != 0 ) {
232
            $ancestorObj = $myCatTree->getByKey($myParent);
233
            $path  = "<a href='" . XOOPSMYLINKURL . '/viewcat.php?cid=' . $ancestorObj->getVar('cid') . "'>" . $ancestorObj->getVar('title') . "</a>&nbsp;:&nbsp;{$path}";
234
            $myParent = $ancestorObj->getVar('pid');
235
        }
236
237
        $path = "{$homePath}{$path}{$itemPath}";
238
        $path = str_replace('&nbsp;:&nbsp;', " <img src='" . mylinksGetIconURL('arrow.gif') . "' style='border-width: 0px;' alt=''> ", $path);