fixed assigning/unassigning and sending empty messages

This commit is contained in:
Quitta 2013-08-03 04:00:41 +02:00
parent 0310bbd680
commit 2ab086183d
4 changed files with 10 additions and 7 deletions

View file

@ -147,7 +147,9 @@ class Ticket{
}
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->load_With_TId($ticket_id);
//if status is not closed

View file

@ -79,7 +79,7 @@
</td>
</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>
</tr>
@ -178,13 +178,13 @@
<p>
Ticket Assigning:
{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="action" value="assignTicket">
<input type="submit" value="Assign Ticket"/>
</form>
{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="action" value="unAssignTicket">
<input type="submit"value="Remove Assign"/>
@ -218,7 +218,7 @@
<td>
<p>
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">
<option></option>
{foreach from=$sGroups key=k item=v}

View file

@ -13,7 +13,8 @@ function reply_on_ticket(){
try{
$author = $_SESSION['ticket_user']->getTUserId();
$content = filter_var($_POST['Content'], FILTER_SANITIZE_STRING);
$content = $_POST['Content'];
$hidden = 0;
if(isset($_POST['hidden']) && Ticket_User::isMod($_SESSION['ticket_user'])){
$hidden = 1;

View file

@ -34,7 +34,7 @@
</td>
</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>
</tr>