Code Duplication    Length = 5-5 lines in 2 locations

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
            }

admin/manage.php 1 location

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