fix ticket access when posting answer
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
This commit is contained in:
@@ -250,6 +250,11 @@ if ($page == 'overview') {
|
||||
if ($replyticket->Get('message') == null) {
|
||||
standard_error(array('stringisempty', 'mymessage'));
|
||||
} else {
|
||||
try {
|
||||
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
|
||||
} catch(Exception $e) {
|
||||
standard_error($e->getMessage());
|
||||
}
|
||||
$now = time();
|
||||
$replyticket->Set('customer', (int)$userinfo['customerid'], true, true);
|
||||
$replyticket->Set('lastchange', $now, true, true);
|
||||
@@ -260,8 +265,6 @@ if ($page == 'overview') {
|
||||
$replyticket->Insert();
|
||||
|
||||
// Update priority if changed
|
||||
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
|
||||
|
||||
if ($replyticket->Get('priority') != $mainticket->Get('priority')) {
|
||||
$mainticket->Set('priority', $replyticket->Get('priority'), true);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class ticket
|
||||
/**
|
||||
* Ticket-Object-Array
|
||||
*
|
||||
* @var ticket
|
||||
* @var ticket[]
|
||||
*/
|
||||
private static $tickets = array();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user