Code Duplication    Length = 10-10 lines in 2 locations

profile.php 1 location

@@ 252-261 (lines=10) @@
249
250
            $displayName =& $xoopsModuleConfig['xhelp_displayName'];    // Determines if username or real name is displayed
251
252
            foreach ($reviews as $review) {
253
                $reviewer = $hMembers->getUser($review->getVar('submittedBy'));
254
                $xoopsTpl->append('xhelp_reviews', array('rating' => $review->getVar('rating'),
255
                            'ratingdsc' => xhelpGetRating($review->getVar('rating')),
256
                            'submittedBy' => ($reviewer ? xhelpGetUsername($reviewer, $displayName) : $xoopsConfig['anonymous']),
257
                            'submittedByUID' => $review->getVar('submittedBy'),
258
                            'responseid' => $review->getVar('responseid'),
259
                            'comments' => $review->getVar('comments'),
260
                            'ticketid' => $review->getVar('ticketid')));
261
            }
262
            $xoopsTpl->assign('xhelp_hasReviews', (count($reviews) > 0));
263
264
            // Ticket Lists

ticket.php 1 location

@@ 603-612 (lines=10) @@
600
        $replacements = array();
601
        $replacements = '<img src="images/priority$1print.png" />';
602
603
        foreach($logMessage as $msg){
604
            $msgLoggedBy =& $member_handler->getUser($msg->getVar('uid'));
605
            $aPrintMessages[] = array('id'=>$msg->getVar('id'),
606
                                 'uid'=>$msg->getVar('uid'),
607
                                 'uname'=>xhelpGetUsername($msgLoggedBy->getVar('uid'), $displayName),
608
                                 'ticketid'=>$msg->getVar('ticketid'),
609
                                 'lastUpdated'=>$msg->lastUpdated('m'),
610
                                 'action'=>preg_replace($patterns, $replacements, $msg->getVar('action')));
611
            $all_users[$msg->getVar('uid')] = '';
612
        }
613
        unset($logMessage);
614
615
        require_once XOOPS_ROOT_PATH.'/class/template.php';