Code Duplication    Length = 5-6 lines in 3 locations

admin/file.php 1 location

@@ 111-115 (lines=5) @@
108
        foreach($aTickets as $ticket){
109
            $crit->add(new Criteria('ticketid', $ticket, "!="));
110
        }
111
        if($hFile->deleteAll($crit)){
112
            header("Location: ".XHELP_ADMIN_URL."/file.php?op=manageFiles");
113
        } else {
114
            redirect_header(XHELP_ADMIN_URL."/file.php?op=manageFiles", 3, _XHELP_MESSAGE_DELETE_FILE_ERR);
115
        }
116
    }
117
}
118

profile.php 1 location

@@ 109-113 (lines=5) @@
106
                $ticketList->setVar('searchid', $searchid);
107
                $ticketList->setVar('weight', $hTicketList->createNewWeight($xoopsUser->getVar('uid')));
108
109
                if($hTicketList->insert($ticketList)){
110
                    header("Location: ".XHELP_BASE_URL."/profile.php");
111
                } else {
112
                    redirect_header(XHELP_BASE_URL."/profile.php", 3, _XHELP_MSG_ADD_TICKETLIST_ERR);
113
                }
114
            }
115
            break;
116

search.php 1 location

@@ 317-322 (lines=6) @@
314
                            redirect_header(XHELP_BASE_URL.'/search.php', 3, _XHELP_MSG_NO_DEL_SEARCH);
315
                        }
316
                        $crit = new Criteria('id', $mySavedSearch['id']);
317
                        if($hSavedSearch->deleteAll($crit)){
318
                            $_xhelpSession->del('xhelp_savedSearches');
319
                            header("Location: ".XHELP_BASE_URL."/search.php");
320
                        } else {
321
                            redirect_header(XHELP_BASE_URL."/search.php", 3, _XHELP_MESSAGE_DELETE_SEARCH_ERR);
322
                        }
323
                    }
324
                } elseif(isset($_POST['search']) || isset($_GET['start'])){ // If this is a new search or next page in search results
325
                    $crit = new CriteriaCompo(new Criteria('uid', $xoopsUser->getVar('uid'), "=" , "j"));