mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-25 08:36:14 +00:00
fixed assigning/unassigning and sending empty messages
This commit is contained in:
parent
f22a251d07
commit
36f4cda67a
4 changed files with 10 additions and 7 deletions
|
@ -147,7 +147,9 @@ class Ticket{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function createReply($content, $author, $ticket_id, $hidden){
|
public static function createReply($content, $author, $ticket_id, $hidden){
|
||||||
if($content != ""){
|
//if not empty
|
||||||
|
if(! ( Trim ( $content ) === '' )){
|
||||||
|
$content = filter_var($content, FILTER_SANITIZE_STRING);
|
||||||
$ticket = new Ticket();
|
$ticket = new Ticket();
|
||||||
$ticket->load_With_TId($ticket_id);
|
$ticket->load_With_TId($ticket_id);
|
||||||
//if status is not closed
|
//if status is not closed
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><font color="#00CED1">Assigned To: </font>{if $ticket_assignedTo neq ""} <a href="index.php?page=show_user&id={$ticket_assignedTo}">{$ticket_assignedToText} {else} {$not_assigned} {/if}</td>
|
<td><font color="#00CED1">Assigned To: </font>{if $ticket_assignedTo neq ""} <a href="index.php?page=show_user&id={$ticket_assignedTo}">{$ticket_assignedToText}</a>{else} {$not_assigned} {/if}</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -178,13 +178,13 @@
|
||||||
<p>
|
<p>
|
||||||
Ticket Assigning:
|
Ticket Assigning:
|
||||||
{if $ticket_assignedTo eq 0}
|
{if $ticket_assignedTo eq 0}
|
||||||
<form id="assign_ticket" method="post" action="">
|
<form id="assign_ticket" method="post" action="index.php?page=show_ticket&id={$ticket_tId}">
|
||||||
<input type="hidden" name="ticket_id" value="{$ticket_tId}">
|
<input type="hidden" name="ticket_id" value="{$ticket_tId}">
|
||||||
<input type="hidden" name="action" value="assignTicket">
|
<input type="hidden" name="action" value="assignTicket">
|
||||||
<input type="submit" value="Assign Ticket"/>
|
<input type="submit" value="Assign Ticket"/>
|
||||||
</form>
|
</form>
|
||||||
{else if $ticket_assignedTo eq $user_id}
|
{else if $ticket_assignedTo eq $user_id}
|
||||||
<form id="assign_ticket" method="post" action="">
|
<form id="assign_ticket" method="post" action="index.php?page=show_ticket&id={$ticket_tId}">
|
||||||
<input type="hidden" name="ticket_id" value="{$ticket_tId}">
|
<input type="hidden" name="ticket_id" value="{$ticket_tId}">
|
||||||
<input type="hidden" name="action" value="unAssignTicket">
|
<input type="hidden" name="action" value="unAssignTicket">
|
||||||
<input type="submit"value="Remove Assign"/>
|
<input type="submit"value="Remove Assign"/>
|
||||||
|
@ -218,7 +218,7 @@
|
||||||
<td>
|
<td>
|
||||||
<p>
|
<p>
|
||||||
Forward to Group:
|
Forward to Group:
|
||||||
<form id="forward" method="post" action="" >
|
<form id="forward" method="post" action="index.php?page=show_ticket&id={$ticket_tId}" >
|
||||||
<select name="group">
|
<select name="group">
|
||||||
<option></option>
|
<option></option>
|
||||||
{foreach from=$sGroups key=k item=v}
|
{foreach from=$sGroups key=k item=v}
|
||||||
|
|
|
@ -13,7 +13,8 @@ function reply_on_ticket(){
|
||||||
|
|
||||||
try{
|
try{
|
||||||
$author = $_SESSION['ticket_user']->getTUserId();
|
$author = $_SESSION['ticket_user']->getTUserId();
|
||||||
$content = filter_var($_POST['Content'], FILTER_SANITIZE_STRING);
|
|
||||||
|
$content = $_POST['Content'];
|
||||||
$hidden = 0;
|
$hidden = 0;
|
||||||
if(isset($_POST['hidden']) && Ticket_User::isMod($_SESSION['ticket_user'])){
|
if(isset($_POST['hidden']) && Ticket_User::isMod($_SESSION['ticket_user'])){
|
||||||
$hidden = 1;
|
$hidden = 1;
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>Assigned To: </strong>{if $ticket_assignedTo neq ""} <a href="index.php?page=show_user&id={$ticket_assignedTo}">{$ticket_assignedToText} {else}<i> {$not_assigned}</i> {/if}</td>
|
<td><strong>Assigned To: </strong>{if $ticket_assignedTo neq ""} <a href="index.php?page=show_user&id={$ticket_assignedTo}">{$ticket_assignedToText}</a> {else}<i> {$not_assigned}</i> {/if}</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Reference in a new issue