Code Duplication    Length = 6-6 lines in 2 locations

addTicket.php 1 location

@@ 463-468 (lines=6) @@
460
            $newUser =& $hMember->getUser($ticket->getVar('uid'));
461
            $ticket->addSubmitter($newUser->getVar('email'), $newUser->getVar('uid'));
462
463
            if(count($aUploadFiles) > 0){   // Has uploaded files?
464
                foreach($aUploadFiles as $key=>$aFile){
465
                    $file = $ticket->storeUpload($key, null, $allowed_mimetypes);
466
                    $_eventsrv->trigger('new_file', array(&$ticket, &$file));
467
                }
468
            }
469
             
470
            // Add custom field values to db
471
            $hTicketValues = xhelpGetHandler('ticketValues');

anon_addTicket.php 1 location

@@ 335-340 (lines=6) @@
332
333
    if($hTicket->insert($ticket)){
334
        $ticket->addSubmitter($xoopsUser->getVar('email'), $xoopsUser->getVar('uid'));
335
        if(count($aUploadFiles) > 0){   // Has uploaded files?
336
            foreach($aUploadFiles as $key=>$aFile){
337
                $file = $ticket->storeUpload($key, null, $allowed_mimetypes);
338
                $_eventsrv->trigger('new_file', array(&$ticket, &$file));
339
            }
340
        }
341
342
        // Add custom field values to db
343
        $hTicketValues = xhelpGetHandler('ticketValues');