mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-15 04:27:14 +01:00
Ticket system added database compatibility to xentral 20 enterprise ticket system
This commit is contained in:
parent
f3dfd870c2
commit
db1c9cc4ce
@ -73,7 +73,7 @@ class Ticket {
|
|||||||
$sql = "SELECT SQL_CALC_FOUND_ROWS
|
$sql = "SELECT SQL_CALC_FOUND_ROWS
|
||||||
t.id,
|
t.id,
|
||||||
".$dropnbox.",
|
".$dropnbox.",
|
||||||
t.schluessel,
|
CONCAT('<a href=\"index.php?module=ticket&action=edit&id=',t.id,'\">',t.schluessel,'</a>'),
|
||||||
t.zeit,
|
t.zeit,
|
||||||
a.name,
|
a.name,
|
||||||
CONCAT('<b>',".$priobetreff.",'</b><br/><i>',replace(substring(t.notiz,1,500),'\n','<br/>'),'</i>'), CONCAT('<div class=\"ticketoffene\"><ul class=\"tag-editor\">'\n,'".$tagstart."',replace(t.tags,',','".$tagend."<div class=\"tag-editor-spacer\"> </div>".$tagstart."'),'".$tagend."','</ul></div>'),
|
CONCAT('<b>',".$priobetreff.",'</b><br/><i>',replace(substring(t.notiz,1,500),'\n','<br/>'),'</i>'), CONCAT('<div class=\"ticketoffene\"><ul class=\"tag-editor\">'\n,'".$tagstart."',replace(t.tags,',','".$tagend."<div class=\"tag-editor-spacer\"> </div>".$tagstart."'),'".$tagend."','</ul></div>'),
|
||||||
@ -220,12 +220,15 @@ class Ticket {
|
|||||||
|
|
||||||
$sql = "SELECT n.id,
|
$sql = "SELECT n.id,
|
||||||
n.betreff,
|
n.betreff,
|
||||||
|
n.bearbeiter,
|
||||||
n.verfasser,
|
n.verfasser,
|
||||||
n.mail,
|
n.mail,
|
||||||
|
t.quelle,
|
||||||
n.zeit,
|
n.zeit,
|
||||||
n.zeitausgang,
|
n.zeitausgang,
|
||||||
n.versendet,
|
n.versendet,
|
||||||
n.text,
|
n.text,
|
||||||
|
n.textausgang,
|
||||||
n.verfasser_replyto,
|
n.verfasser_replyto,
|
||||||
n.mail_replyto,
|
n.mail_replyto,
|
||||||
n.mail_cc,
|
n.mail_cc,
|
||||||
@ -278,7 +281,25 @@ class Ticket {
|
|||||||
|
|
||||||
// Add Messages now
|
// Add Messages now
|
||||||
foreach ($messages as $message) {
|
foreach ($messages as $message) {
|
||||||
if ($message['versendet'] == '1') {
|
|
||||||
|
// Clear this first
|
||||||
|
$this->app->Tpl->Set('NACHRICHT_ANHANG',"");
|
||||||
|
|
||||||
|
// Xentral 20 compatibility
|
||||||
|
if ($message['textausgang'] != '') {
|
||||||
|
// Sent message
|
||||||
|
$this->app->Tpl->Set("NACHRICHT_BETREFF",htmlentities($message['betreff'].' (gesendet)'));
|
||||||
|
$this->app->Tpl->Set("NACHRICHT_ZEIT",$message['zeitausgang']);
|
||||||
|
$this->app->Tpl->Set("NACHRICHT_FLOAT","right");
|
||||||
|
$this->app->Tpl->Set("NACHRICHT_TEXT",$message['textausgang']);
|
||||||
|
$this->app->Tpl->Set("NACHRICHT_SENDER",htmlentities($message['bearbeiter']));
|
||||||
|
$this->app->Tpl->Set("NACHRICHT_RECIPIENTS",htmlentities($message['verfasser']." <".$message['mail'].">"));
|
||||||
|
$this->app->Tpl->Parse('MESSAGES', "ticket_nachricht.tpl");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($message['versendet'] == '1' && empty($message['textausgang'])) { // textausgang is always empty, except for old Xentral 20 tickets
|
||||||
|
|
||||||
|
// Sent message
|
||||||
|
|
||||||
if (is_null($message['zeitausgang'])) {
|
if (is_null($message['zeitausgang'])) {
|
||||||
if (!$showdrafts) {
|
if (!$showdrafts) {
|
||||||
@ -295,8 +316,18 @@ class Ticket {
|
|||||||
$this->app->Tpl->Set("NACHRICHT_ZEIT",$message['zeitausgang']);
|
$this->app->Tpl->Set("NACHRICHT_ZEIT",$message['zeitausgang']);
|
||||||
$this->app->Tpl->Set("NACHRICHT_NAME",htmlentities($message['verfasser']));
|
$this->app->Tpl->Set("NACHRICHT_NAME",htmlentities($message['verfasser']));
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
// Received message
|
||||||
|
|
||||||
$this->app->Tpl->Set("NACHRICHT_SENDER",htmlentities($message['verfasser']." <".$message['mail'].">"));
|
$this->app->Tpl->Set("NACHRICHT_SENDER",htmlentities($message['verfasser']." <".$message['mail'].">"));
|
||||||
$this->app->Tpl->Set("NACHRICHT_RECIPIENTS",htmlentities($message['mail_recipients']));
|
|
||||||
|
if ($message['mail_recipients'] != '') {
|
||||||
|
$this->app->Tpl->Set("NACHRICHT_RECIPIENTS",htmlentities($message['mail_recipients']));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Xentral 20 compatibility
|
||||||
|
$this->app->Tpl->Set("NACHRICHT_RECIPIENTS",htmlentities($message['quelle']));
|
||||||
|
}
|
||||||
$this->app->Tpl->Set("NACHRICHT_CC_RECIPIENTS",htmlentities($message['mail_cc_recipients']));
|
$this->app->Tpl->Set("NACHRICHT_CC_RECIPIENTS",htmlentities($message['mail_cc_recipients']));
|
||||||
$this->app->Tpl->Set("NACHRICHT_BETREFF",htmlentities($message['betreff']));
|
$this->app->Tpl->Set("NACHRICHT_BETREFF",htmlentities($message['betreff']));
|
||||||
$this->app->Tpl->Set("NACHRICHT_FLOAT","left");
|
$this->app->Tpl->Set("NACHRICHT_FLOAT","left");
|
||||||
@ -305,10 +336,10 @@ class Ticket {
|
|||||||
|
|
||||||
$this->app->Tpl->Set("NACHRICHT_TEXT",$message['text']);
|
$this->app->Tpl->Set("NACHRICHT_TEXT",$message['text']);
|
||||||
|
|
||||||
$this->app->Tpl->Set('NACHRICHT_ANHANG',"");
|
|
||||||
$this->add_attachments_html($id,$message['id'],'NACHRICHT_ANHANG',false);
|
$this->add_attachments_html($id,$message['id'],'NACHRICHT_ANHANG',false);
|
||||||
|
|
||||||
$this->app->Tpl->Parse('MESSAGES', "ticket_nachricht.tpl");
|
$this->app->Tpl->Parse('MESSAGES', "ticket_nachricht.tpl");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user