Code Duplication    Length = 5-5 lines in 2 locations

admin/manage.php 1 location

@@ 257-261 (lines=5) @@
254
            foreach ($frarray as $frame) {
255
                $action_edit   = "<a href='" . $baseurl . '?op=edit&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/edit.png' alt='" . _AM_MYIFRAME_EDIT . "'></a>";
256
                $action_delete = "<a href='" . $baseurl . '?op=delete&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/delete.png' alt='" . _AM_MYIFRAME_DELETE . "'></a>";
257
                if (xoops_trim($frame->getVar('frame_description') === '')) {
258
                    $liendesc = $frame->getVar('frame_url');
259
                } else {
260
                    $liendesc = "<a href='" . XOOPS_URL . '/modules/myiframe/index.php?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>';
261
                }
262
                echo "<tr class='" . $class . "'><td align='center'>" . $frame->getVar('frame_frameid') . "</td><td align='center'>" . $liendesc . "</td><td align='center'>" . formatTimestamp($frame->getVar('frame_created'))
263
                     . "</td><td align='center'>" . $frame->getVar('frame_hits') . "</td><td align='center'>" . $action_edit . '&nbsp;-&nbsp;' . $action_delete . "</td></tr>\n";
264
                $class = ($class === 'even') ? 'odd' : 'even';

index.php 1 location

@@ 77-81 (lines=5) @@
74
        $frarray = $iframeHandler->getObjects($critere);
75
        if (count($frarray) > 0) {
76
            foreach ($frarray as $frame) {
77
                if (xoops_trim($frame->getVar('frame_description') === '')) {
78
                    $liendesc = $frame->getVar('frame_url');
79
                } else {
80
                    $liendesc = "<a href='" . $baseurl . '?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>';
81
                }
82
                $iframe['list'] = $liendesc;
83
                $xoopsTpl->append('iframes', $iframe);
84
            }