Minor - format code

pull/2487/head
jmontoyaa 7 years ago
parent f7b633d9f8
commit f1445e274c
  1. 16
      main/inc/lib/message.lib.php
  2. 13
      main/inc/lib/notification.lib.php

@ -311,7 +311,12 @@ class MessageManager
// Validating fields
if (empty($subject) && empty($group_id)) {
Display::addFlash(Display::return_message(get_lang('YouShouldWriteASubject'), 'warning'));
Display::addFlash(
Display::return_message(
get_lang('YouShouldWriteASubject'),
'warning'
)
);
return false;
} elseif ($total_filesize > intval(api_get_setting('message_max_upload_filesize'))) {
$warning = sprintf(
@ -328,7 +333,6 @@ class MessageManager
//Just in case we replace the and \n and \n\r while saving in the DB
//$content = str_replace(array("\n", "\n\r"), '<br />', $content);
$now = api_get_utc_datetime();
if (!empty($receiver_user_id) || !empty($group_id)) {
// message for user friend
@ -435,7 +439,13 @@ class MessageManager
$group_info['topic_id'] = $topic_id;
$group_info['msg_id'] = $inbox_last_id;
$user_list = $usergroup->get_users_by_group($group_id, false, array(), 0, 1000);
$user_list = $usergroup->get_users_by_group(
$group_id,
false,
array(),
0,
1000
);
// Adding more sense to the message group
$subject = sprintf(get_lang('ThereIsANewMessageInTheGroupX'), $group_info['name']);

@ -212,15 +212,15 @@ class Notification extends Model
/**
* Save message notification
* @param int $type message type
* @param int $type message type
* NOTIFICATION_TYPE_MESSAGE,
* NOTIFICATION_TYPE_INVITATION,
* NOTIFICATION_TYPE_GROUP
* @param array $userList recipients: user list of ids
* @param string $title
* @param string $content
* @param array $senderInfo result of api_get_user_info() or GroupPortalManager:get_group_data()
* @param array $attachments
* @param array $userList recipients: user list of ids
* @param string $title
* @param string $content
* @param array $senderInfo result of api_get_user_info() or GroupPortalManager:get_group_data()
* @param array $attachments
*
*/
public function save_notification(
@ -234,7 +234,6 @@ class Notification extends Model
$this->type = intval($type);
$content = $this->formatContent($content, $senderInfo);
$titleToNotification = $this->formatTitle($title, $senderInfo);
$settingToCheck = '';
$avoid_my_self = false;

Loading…
Cancel
Save