Cleaning code

skala
Julio Montoya 15 years ago
parent 055ff171ab
commit 0863fbc7eb
  1. 8
      main/messages/download.php
  2. 16
      main/messages/inbox.php
  3. 2
      main/messages/index.php
  4. 8
      main/messages/new_message.php
  5. 2
      main/messages/notify.php
  6. 16
      main/messages/outbox.php
  7. 2
      main/messages/plugin.php
  8. 2
      main/messages/send_message.php
  9. 3
      main/messages/send_message_to_userfriend.inc.php
  10. 13
      main/messages/view_message.php

@ -1,20 +1,16 @@
<?php
/* For licensing terms, see /chamilo_license.txt */
/* For licensing terms, see /license.txt */
/**
==============================================================================
* This file is responsible for passing requested file attachments from messages
* Html files are parsed to fix a few problems with URLs,
* but this code will hopefully be replaced soon by an Apache URL
* rewrite mechanism.
*
* @package dokeos.messages
==============================================================================
* @package chamilo.messages
*/
/*
==============================================================================
MAIN CODE
==============================================================================
*/
session_cache_limiter('public');

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /chamilo_license.txt */
/* For licensing terms, see /license.txt */
/**
* @package dokeos.messages
* @package chamilo.messages
*/
// name of the language file that needs to be included
@ -42,31 +42,27 @@ function hide_icon_edit(element_html) {
</script>';
/*
==============================================================================
MAIN CODE
==============================================================================
*/
$nameTools = get_lang('Messages');
$request=api_is_xml_http_request();
if (isset($_GET['form_reply']) || isset($_GET['form_delete'])) {
/***********************************************/
$info_reply=array();
$info_delete=array();
/***********************************************/
if ( isset($_GET['form_reply']) ) {
//allow to insert messages
$info_reply=explode(base64_encode('&%ff..x'),$_GET['form_reply']);
$count_reply=count($info_reply);
$button_sent=urldecode($info_reply[4]);
}
/***********************************************/
if ( isset($_GET['form_delete']) ) {
//allow to delete messages
$info_delete=explode(',',$_GET['form_delete']);
$count_delete=(count($info_delete)-1);
}
/***********************************************/
if ( isset($button_sent) ) {
$title = api_convert_encoding(urldecode($info_reply[0]),'UTF-8',$charset);
$content = api_convert_encoding(str_replace("\\","",urldecode($info_reply[1])),'UTF-8',$charset);
@ -185,9 +181,7 @@ echo '<div id="social-content">';
echo '</div>';
/*
==============================================================================
FOOTER
==============================================================================
*/
Display::display_footer();

@ -1,5 +1,5 @@
<?php
/* For licensing terms, see /chamilo_license.txt */
/* For licensing terms, see /license.txt */
require_once '../inc/global.inc.php';
if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') {
header('Location:inbox.php?f=social');

@ -1,5 +1,5 @@
<?php
/* For licensing terms, see /chamilo_license.txt */
/* For licensing terms, see /license.txt */
/**
* This script shows a compose area (wysiwyg editor if supported, otherwise
* a simple textarea) where the user can type a message.
@ -101,9 +101,7 @@ function add_image_form() {
$nameTools = get_lang('ComposeMessage');
/*
==============================================================================
FUNCTIONS
==============================================================================
*/
/**
@ -255,9 +253,7 @@ function manage_form ($default, $select_from_user_list = null) {
}
}
/*
==============================================================================
MAIN SECTION
==============================================================================
*/
if ($_GET['f']=='social') {
$this_section = SECTION_SOCIAL;
@ -370,9 +366,7 @@ echo '<div id="social-content" >';
echo '</div>';
/*
==============================================================================
FOOTER
==============================================================================
*/
Display::display_footer();

@ -1,5 +1,5 @@
<?php // $Id: notify.php 20962 2009-05-25 03:15:53Z iflorespaz $
/* For licensing terms, see /chamilo_license.txt */
/* For licensing terms, see /license.txt */
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'message.lib.php';
header("Cache-Control: no-cache, must-revalidate");

@ -1,9 +1,7 @@
<?php
/* For licensing terms, see /chamilo_license.txt */
/* For licensing terms, see /license.txt */
/*
==============================================================================
INIT SECTION
==============================================================================
*/
// name of the language file that needs to be included
$language_file = array('registration','messages','userInfo');
@ -20,6 +18,7 @@ if (isset($_GET['messages_page_nr'])) {
$social_link = '&f=social';
}
header('Location:outbox.php?pager='.Security::remove_XSS($_GET['messages_page_nr']).$social_link.'');
exit;
}
}
@ -61,14 +60,11 @@ function deselect_all(formita)
/*
==============================================================================
MAIN CODE
==============================================================================
*/
//$nameTools = get_lang('Messages');
//api_display_tool_title(api_xml_http_response_encode(get_lang('Inbox')));
if ($_GET['f']=='social') {
$this_section = SECTION_SOCIAL;
@ -100,11 +96,10 @@ if ($_GET['f']=='social') {
}
}
/**************************************************************/
$info_delete_outbox=array();
$info_delete_outbox=explode(',',$_GET['form_delete_outbox']);
$count_delete_outbox=(count($info_delete_outbox)-1);
/**************************************************************/
if( trim($info_delete_outbox[0])=='delete' ) {
for ($i=1;$i<=$count_delete_outbox;$i++) {
MessageManager::delete_message_by_user_sender(api_get_user_id(),$info_delete_outbox[$i]);
@ -117,7 +112,7 @@ if( trim($info_delete_outbox[0])=='delete' ) {
Display::display_normal_message(api_xml_http_response_encode($message_box),false);
exit;
}
/**************************************************************/
$table_message = Database::get_main_table(TABLE_MESSAGE);
$user_sender_id=api_get_user_id();
@ -178,10 +173,7 @@ echo '</div>';
/*
==============================================================================
FOOTER
==============================================================================
*/
Display::display_footer();
?>

@ -1,5 +1,5 @@
<?php
/* For licensing terms, see /chamilo_license.txt */
/* For licensing terms, see /license.txt */
/**
* This script is a configuration file for the messages plugin. You can use it as a master for other plugins.
* These settings will be used in the administration interface for plugins (Dokeos configuration settings->Plugins)

@ -1,5 +1,5 @@
<?php
/* For licensing terms, see /chamilo_license.txt */
/* For licensing terms, see /license.txt */
$language_file = array('registration','messages','userInfo','admin');
$cidReset=true;

@ -1,5 +1,6 @@
<?php
/* For licensing terms, see /chamilo_license.txt */
/* For licensing terms, see /license.txt */
$language_file = array('registration','messages','userInfo','admin');
$cidReset=true;
require_once '../inc/global.inc.php';

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /chamilo_license.txt */
/* For licensing terms, see /license.txt */
/**
* @package dokeos.messages
* @package chamilo.messages
*/
$language_file = array('registration','messages','userInfo');
@ -15,9 +15,7 @@ require_once api_get_path(LIBRARY_PATH).'message.lib.php';
/*
==============================================================================
HEADER
==============================================================================
*/
$htmlHeadXtra[] = '<script type="text/javascript" src="/main/inc/lib/javascript/jquery.js"></script>';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/thickbox.js" type="text/javascript" language="javascript"></script>';
@ -86,10 +84,7 @@ echo '<div id="social-content">';
}
echo '<div id="'.$id_content_right.'">';
//MAIN CONTENT
//MAIN CONTENT
$message = MessageManager::show_message_box($id_message,$source);
if (!empty($message)) {
@ -103,9 +98,7 @@ echo '<div id="social-content">';
echo '</div>';
/*
==============================================================================
FOOTER
==============================================================================
*/
Display::display_footer();
?>
Loading…
Cancel
Save