Code Duplication    Length = 7-7 lines in 4 locations

functions.php 4 locations

@@ 216-222 (lines=7) @@
213
 *
214
 * @access public
215
 */
216
function xhelpSetDept($tickets, $dept)
217
{
218
    $hTicket =& xhelpGetHandler('ticket');
219
    $crit    = new Criteria('id', "(". implode($tickets, ',') .")", "IN");
220
221
    return $hTicket->updateAll('department', intval($dept), $crit);
222
}
223
224
/**
225
 * Set specified tickets to a priority
@@ 233-239 (lines=7) @@
230
 *
231
 * @access public
232
 */
233
function xhelpSetPriority($tickets, $priority)
234
{
235
    $hTicket =& xhelpGetHandler('ticket');
236
    $crit    = new Criteria('id', "(". implode($tickets, ',') .")", 'IN');
237
238
    return $hTicket->updateAll('priority', intval($priority), $crit);
239
}
240
241
/**
242
 * Set specified tickets to a status
@@ 250-256 (lines=7) @@
247
 *
248
 * @access public
249
 */
250
function xhelpSetStatus($tickets, $status)
251
{
252
    $hTicket =& xhelpGetHandler('ticket');
253
    $crit    = new Criteria('id', "(". implode($tickets, ',') .")", 'IN');
254
255
    return $hTicket->updateAll('status', intval($status), $crit);
256
}
257
258
/**
259
 * Assign specified tickets to a staff member
@@ 269-275 (lines=7) @@
266
 *
267
 * @access public
268
 */
269
function xhelpSetOwner($tickets, $owner)
270
{
271
    $hTicket =& xhelpGetHandler('ticket');
272
    $crit    = new Criteria('id', "(". implode($tickets, ',') .")", 'IN');
273
274
    return $hTicket->updateAll('ownership', intval($owner), $crit);
275
}
276
277
/**
278
 * Add the response to each ticket