Code Duplication    Length = 11-14 lines in 2 locations

caffeinated/admin/new/tickets/Tickets_Admin_Page.core.php 1 location

@@ 264-277 (lines=14) @@
261
                    }
262
                }
263
            }
264
        } else {
265
            // grab single id and trash
266
            $TKT_ID = absint($this->_req_data['TKT_ID']);
267
268
            if ($trash) {
269
                if (! $TKT->delete_by_ID($TKT_ID)) {
270
                    $success = 0;
271
                }
272
            } else {
273
                if (! $TKT->restore_by_ID($TKT_ID)) {
274
                    $success = 0;
275
                }
276
            }
277
        }
278
279
        $action_desc = $trash ? 'moved to the trash' : 'restored';
280
        $this->_redirect_after_action($success, 'Tickets', $action_desc, array());

caffeinated/admin/extend/events/Extend_Events_Admin_Page.core.php 1 location

@@ 1331-1341 (lines=11) @@
1328
                    $success = 0;
1329
                }
1330
            }
1331
        } else {
1332
            // grab single id and trash
1333
            $TKT_ID = absint($this->_req_data['TKT_ID']);
1334
            if ($trash) {
1335
                if (! $TKT->delete_by_ID($TKT_ID)) {
1336
                    $success = 0;
1337
                }
1338
            } elseif (! $TKT->restore_by_ID($TKT_ID)) {
1339
                $success = 0;
1340
            }
1341
        }
1342
        $action_desc = $trash ? 'moved to the trash' : 'restored';
1343
        $query_args = array(
1344
            'action' => 'ticket_list_table',