| | | |
| 1 | 1 | | <?{ |
| 3 | 3 | | /* |
| 4 | 4 | | ** ACCEPT TICKET |
| 5 | 5 | | ** |
| 6 | 6 | | ** Make logged in user the owner |
| 7 | 7 | | ** of this ticket |
| 8 | 8 | | ** |
| 9 | 9 | | */ |
| 11 | 11 | | $action = "accept"; |
| 12 | 12 | | include("action_header.php"); |
| 14 | 14 | | $res = $zen->accept_ticket($id, $login_id); |
| 15 | 16 | | if( $res ) { |
| 17 | + | if( $login_bin ) { |
| 18 | + | // if the user has a home bin set, we move the ticket into the user's |
| 19 | + | // home bin when it is accepted; to prevent an additional log entry, |
| 20 | + | // uncomment the following line and comment the one after it |
| 21 | + | //$zen->move_ticket($id, $login_bin, $login_id, "skip_log"); |
| 22 | + | $zen->move_ticket($id, $login_bin, $login_id); |
| 23 | + | } |
| 16 | 25 | | $ticket = $zen->get_ticket($id); |
| 17 | 26 | | $msg[] = tr("Ticket ? was accepted by ?", array($id,$login_name)); |
| 18 | 27 | | } else { |
| 19 | 28 | | $errs[] = tr("System error: Ticket ? could not be accepted", array($id)).$zen->db_error; |
| 20 | 29 | | } |
| 21 | 30 | | $action = null; |
| 23 | 32 | | include("$libDir/nav.php"); |
| 24 | 33 | | $zen->printErrors($errs); |
| 25 | 34 | | if( $page_type == 'project' ) { |
| 26 | 35 | | include("$templateDir/projectView.php"); |
| 27 | 36 | | } else { |
| 28 | 37 | | include("$templateDir/ticketView.php"); |
| 29 | 38 | | } |
| 31 | 40 | | include("$libDir/footer.php"); |
| 33 | 42 | | }?> |