'.GetFullUserName($result[4]); //$message[2] = ''.$result[2].''; $message[2] = api_convert_and_format_date($result[3], DATE_TIME_FORMAT_LONG); //date stays the same - $message[3] = ''.Display::return_icon('delete.png', get_lang('DeleteMessage')).''; + $message[3] = ''.Display::return_icon('delete.png', get_lang('DeleteMessage')).''; } foreach ($message as $key => $value) { @@ -1527,7 +1527,7 @@ class MessageManager // display sortable table with messages of the current user $table = new SortableTable('message_outbox', array('MessageManager', 'get_number_of_messages_sent'), array('MessageManager', 'get_message_data_sent'), 3, 20, 'DESC'); - $parameters['f'] = Security::remove_XSS($_GET['f']); + $parameters['f'] = isset($_GET['f']) && $_GET['f'] == 'social' ? 'social' : null; $table->set_additional_parameters($parameters); $table->set_header(0, '', false, array('style' => 'width:15px;')); diff --git a/main/messages/new_message.php b/main/messages/new_message.php index 7b63fee8d3..8ef36337b6 100755 --- a/main/messages/new_message.php +++ b/main/messages/new_message.php @@ -164,7 +164,7 @@ function show_compose_to_user ($receiver_id) { function manage_form($default, $select_from_user_list = null, $sent_to = null) { $group_id = isset($_REQUEST['group_id']) ? intval($_REQUEST['group_id']) : null; $message_id = isset($_GET['message_id']) ? intval($_GET['message_id']) : null; - $param_f = isset($_GET['f']) ? Security::remove_XSS($_GET['f']):''; + $param_f = isset($_GET['f']) && $_GET['f'] == 'social' ? 'social' : null; $form = new FormValidator('compose_message', null, api_get_self().'?f='.$param_f, null, array('enctype'=>'multipart/form-data')); if (empty($group_id)) { diff --git a/main/messages/outbox.php b/main/messages/outbox.php index 52145d0f35..8f5bf96952 100755 --- a/main/messages/outbox.php +++ b/main/messages/outbox.php @@ -6,13 +6,15 @@ // name of the language file that needs to be included $language_file = array('registration','messages','userInfo'); -$cidReset=true; +$cidReset = true; require_once '../inc/global.inc.php'; api_block_anonymous_users(); if (isset($_GET['messages_page_nr'])) { - if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') { + if (api_get_setting('allow_social_tool')=='true' && + api_get_setting('allow_message_tool')=='true' + ) { $social_link = ''; if ($_REQUEST['f']=='social') { $social_link = '&f=social'; diff --git a/main/mySpace/student.php b/main/mySpace/student.php index 62d59444cd..cf94fbffb1 100755 --- a/main/mySpace/student.php +++ b/main/mySpace/student.php @@ -4,9 +4,7 @@ * Student report * @package chamilo.reporting */ -/** - * Code - */ + // name of the language file that needs to be included $language_file = array ('registration', 'index', 'tracking', 'admin'); $cidReset = true; @@ -198,8 +196,14 @@ if (api_is_drh()) { } $actions .= ''; -$actions .= Display::url(Display::return_icon('printer.png', get_lang('Print'), array(), ICON_SIZE_MEDIUM), 'javascript: void(0);', array('onclick'=>'javascript: window.print();')); -$actions .= Display::url(Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), array(), ICON_SIZE_MEDIUM), api_get_self().'?export=csv&keyword='.$keyword); +$actions .= Display::url( + Display::return_icon('printer.png', get_lang('Print'), array(), ICON_SIZE_MEDIUM), 'javascript: void(0);', + array('onclick'=>'javascript: window.print();') +); +$actions .= Display::url( + Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), array(), ICON_SIZE_MEDIUM), + api_get_self().'?export=csv&keyword='.$keyword +); $actions .= ''; $actions .= '