Hi again,
This MOD similar with these 2 topics below:
- http://www.osticket.com/forums/showthread.php?t=1990(http://www.osticket.com/forums/showthread.php?t=1990)
- http://www.osticket.com/forums/showthread.php?t=2068(http://www.osticket.com/forums/showthread.php?t=2068)
This current topic is for avoid duplicate note from staff saved in database.
Open \include\class.ticket.php, FIND:
//Insert Internal Notes
function postNote($title,$note,$alert,$poster='') {
global $thisuser,$cfg;
AFTER, ADD:
//Begin of MOD added by Masino Sinaga, May 5, 2009
global $errors;
$sql1='SELECT ticket_id FROM '.TICKET_NOTE_TABLE.'
WHERE ticket_id='.db_input($this->getId()).'
AND title='.db_input(Format:($title)).'
AND note='.db_input(Format:($note)).'';
$res1=db_query($sql1);
if( ($res1 && db_num_rows($res1)) ) {
$errors='Note you entered already exists in database. Please enter another one!';
return 0;
}
//End of MOD added by Masino Sinaga, May 5, 2009
Best regards,
Masino Sinaga