From fedec9bdc28b10ad46e623f33c445095f75d0ce4 Mon Sep 17 00:00:00 2001 From: zarzuelo <zarzuelo@gmail.com> Date: Mon, 27 Aug 2012 09:25:59 +0000 Subject: [PATCH] 2012-08-27 Sergio Martin <sergio.martin@artica.es> * godmode/alerts/alert_commands.php: Fixed a little bugs of presentation in the command descriptions git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6915 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/godmode/alerts/alert_commands.php | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 8c6bdb7049..7004cd0765 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2012-08-27 Sergio Martin <sergio.martin@artica.es> + + * godmode/alerts/alert_commands.php: Fixed a little bugs + of presentation in the command descriptions + 2012-08-24 Sergio Martin <sergio.martin@artica.es> * extensions/plugin_registration.php: Modified the plugin diff --git a/pandora_console/godmode/alerts/alert_commands.php b/pandora_console/godmode/alerts/alert_commands.php index ede69b3953..849806eec1 100644 --- a/pandora_console/godmode/alerts/alert_commands.php +++ b/pandora_console/godmode/alerts/alert_commands.php @@ -33,6 +33,12 @@ if (is_ajax ()) { if ($get_alert_command) { $id = (int) get_parameter ('id'); $command = alerts_get_alert_command ($id); + + // If is setted a description, we change the carriage return by <br> tags + if(isset($command['description'])) { + $command['description'] = io_safe_input(str_replace("\r\n","<br>", io_safe_output($command['description']))); + } + echo json_encode ($command); } return; @@ -165,7 +171,7 @@ foreach ($commands as $command) { $data[0] .= $command['name']; $data[0] .= '</span>'; $data[1] = $command['id']; - $data[2] = $command['description']; + $data[2] = str_replace("\r\n","<br>",io_safe_output($command['description'])); $data[3] = ''; if (! $command['internal']) $data[3] = '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_commands&delete_command=1&id='.$command['id'].'"