diff --git a/main/inc/lib/database.constants.inc.php b/main/inc/lib/database.constants.inc.php index e94c0c6624..d95d59fb9a 100755 --- a/main/inc/lib/database.constants.inc.php +++ b/main/inc/lib/database.constants.inc.php @@ -116,9 +116,6 @@ define('TABLE_MAIN_SESSION_FIELD', 'session_field'); define('TABLE_MAIN_SESSION_FIELD_OPTIONS', 'session_field_options'); define('TABLE_MAIN_SESSION_FIELD_VALUES', 'session_field_values'); -// Message -define('TABLE_MAIN_MESSAGE', 'message'); - // Term and conditions define('TABLE_MAIN_LEGAL', 'legal'); diff --git a/main/inc/lib/social.lib.php b/main/inc/lib/social.lib.php index d107846ae6..316cd7bfe5 100755 --- a/main/inc/lib/social.lib.php +++ b/main/inc/lib/social.lib.php @@ -207,7 +207,7 @@ class SocialManager extends UserManager */ public static function send_invitation_friend($user_id, $friend_id, $message_title, $message_content) { - $tbl_message = Database::get_main_table(TABLE_MAIN_MESSAGE); + $tbl_message = Database::get_main_table(TABLE_MESSAGE); $user_id = intval($user_id); $friend_id = intval($friend_id); @@ -271,7 +271,7 @@ class SocialManager extends UserManager */ public static function get_message_number_invitation_by_user_id($user_receiver_id) { - $tbl_message = Database::get_main_table(TABLE_MAIN_MESSAGE); + $tbl_message = Database::get_main_table(TABLE_MESSAGE); $sql = 'SELECT COUNT(*) as count_message_in_box FROM '.$tbl_message.' WHERE user_receiver_id='.intval($user_receiver_id).' AND @@ -289,7 +289,7 @@ class SocialManager extends UserManager */ public static function get_list_invitation_of_friends_by_user_id($user_id) { - $tbl_message = Database::get_main_table(TABLE_MAIN_MESSAGE); + $tbl_message = Database::get_main_table(TABLE_MESSAGE); $sql = 'SELECT user_sender_id,send_date,title,content FROM '.$tbl_message.' WHERE @@ -312,7 +312,7 @@ class SocialManager extends UserManager public static function get_list_invitation_sent_by_user_id($user_id) { $list_friend_invitation = array(); - $tbl_message = Database::get_main_table(TABLE_MAIN_MESSAGE); + $tbl_message = Database::get_main_table(TABLE_MESSAGE); $sql = 'SELECT user_receiver_id, send_date,title,content FROM '.$tbl_message.' WHERE user_sender_id = '.intval($user_id).' AND msg_status = '.MESSAGE_STATUS_INVITATION_PENDING; @@ -332,7 +332,7 @@ class SocialManager extends UserManager */ public static function invitation_accepted($user_send_id, $user_receiver_id) { - $tbl_message = Database::get_main_table(TABLE_MAIN_MESSAGE); + $tbl_message = Database::get_main_table(TABLE_MESSAGE); $sql = "UPDATE $tbl_message SET msg_status = ".MESSAGE_STATUS_INVITATION_ACCEPTED." WHERE @@ -351,7 +351,7 @@ class SocialManager extends UserManager */ public static function invitation_denied($user_send_id, $user_receiver_id) { - $tbl_message = Database::get_main_table(TABLE_MAIN_MESSAGE); + $tbl_message = Database::get_main_table(TABLE_MESSAGE); $sql = 'DELETE FROM '.$tbl_message.' WHERE user_sender_id = '.((int) $user_send_id).' AND @@ -1148,7 +1148,7 @@ class SocialManager extends UserManager */ public static function sendWallMessage($userId, $friendId, $messageContent, $messageId = 0 ,$messageStatus) { - $tblMessage = Database::get_main_table(TABLE_MAIN_MESSAGE); + $tblMessage = Database::get_main_table(TABLE_MESSAGE); $userId = intval($userId); $friendId = intval($friendId); $messageId = intval($messageId); @@ -1247,7 +1247,7 @@ class SocialManager extends UserManager if (empty($start)) { $start = '0000-00-00'; } - $tblMessage = Database::get_main_table(TABLE_MAIN_MESSAGE); + $tblMessage = Database::get_main_table(TABLE_MESSAGE); $tblMessageAttachement = Database::get_main_table(TABLE_MESSAGE_ATTACHMENT); $userId = intval($userId); @@ -1658,22 +1658,6 @@ class SocialManager extends UserManager $html = Display::panel($form->returnForm(), get_lang('SocialWall')); return $html; - - $html = '
'; - - return $html; } /** diff --git a/main/inc/lib/statistics.lib.php b/main/inc/lib/statistics.lib.php index 5ee2c63d40..50eb4758a7 100644 --- a/main/inc/lib/statistics.lib.php +++ b/main/inc/lib/statistics.lib.php @@ -703,7 +703,7 @@ class Statistics */ public static function getMessages($messageType) { - $message_table = Database::get_main_table(TABLE_MAIN_MESSAGE); + $message_table = Database::get_main_table(TABLE_MESSAGE); $user_table = Database::get_main_table(TABLE_MAIN_USER); $access_url_rel_user_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); diff --git a/main/inc/lib/usermanager.lib.php b/main/inc/lib/usermanager.lib.php index 26183fe95c..72691c2dfe 100755 --- a/main/inc/lib/usermanager.lib.php +++ b/main/inc/lib/usermanager.lib.php @@ -4062,7 +4062,7 @@ class UserManager public static function remove_user_rel_user($friend_id, $real_removed = false, $with_status_condition = '') { $tbl_my_friend = Database :: get_main_table(TABLE_MAIN_USER_REL_USER); - $tbl_my_message = Database :: get_main_table(TABLE_MAIN_MESSAGE); + $tbl_my_message = Database :: get_main_table(TABLE_MESSAGE); $friend_id = intval($friend_id); if ($real_removed) {