From 2ab086183d24a28d8beec97af2d390722fff70ba Mon Sep 17 00:00:00 2001 From: Quitta Date: Sat, 3 Aug 2013 04:00:41 +0200 Subject: [PATCH] fixed assigning/unassigning and sending empty messages --- .../tools/server/ryzom_ams/ams_lib/autoload/ticket.php | 4 +++- .../ryzom_ams/ams_lib/ingame_templates/show_ticket.tpl | 8 ++++---- .../server/ryzom_ams/www/html/func/reply_on_ticket.php | 3 ++- .../server/ryzom_ams/www/html/templates/show_ticket.tpl | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket.php index 0db211738..c9703d232 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket.php @@ -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 diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/ingame_templates/show_ticket.tpl b/code/ryzom/tools/server/ryzom_ams/ams_lib/ingame_templates/show_ticket.tpl index 253131d90..841b47bb1 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/ingame_templates/show_ticket.tpl +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/ingame_templates/show_ticket.tpl @@ -79,7 +79,7 @@ - Assigned To: {if $ticket_assignedTo neq ""} {$ticket_assignedToText} {else} {$not_assigned} {/if} + Assigned To: {if $ticket_assignedTo neq ""} {$ticket_assignedToText}{else} {$not_assigned} {/if} @@ -178,13 +178,13 @@

Ticket Assigning: {if $ticket_assignedTo eq 0} -

+
{else if $ticket_assignedTo eq $user_id} -
+ @@ -218,7 +218,7 @@

Forward to Group: - +