Minor - format code, change function name

pull/2487/head
jmontoyaa 8 years ago
parent 63045f0faf
commit a6b651f587
  1. 12
      main/inc/lib/message.lib.php
  2. 2
      main/inc/lib/notification.lib.php
  3. 2
      main/inc/lib/social.lib.php

@ -311,16 +311,16 @@ class MessageManager
return false; return false;
} }
$total_filesize = 0; $totalFileSize = 0;
if (is_array($file_attachments)) { if (is_array($file_attachments)) {
foreach ($file_attachments as $file_attach) { foreach ($file_attachments as $file_attach) {
$fileSize = isset($file_attach['size']) ? $file_attach['size'] : 0; $fileSize = isset($file_attach['size']) ? $file_attach['size'] : 0;
if (is_array($fileSize)) { if (is_array($fileSize)) {
foreach ($fileSize as $size) { foreach ($fileSize as $size) {
$total_filesize += $size; $totalFileSize += $size;
} }
} else { } else {
$total_filesize += $fileSize; $totalFileSize += $fileSize;
} }
} }
} }
@ -334,7 +334,7 @@ class MessageManager
) )
); );
return false; return false;
} elseif ($total_filesize > intval(api_get_setting('message_max_upload_filesize'))) { } elseif ($totalFileSize > intval(api_get_setting('message_max_upload_filesize'))) {
$warning = sprintf( $warning = sprintf(
get_lang("FilesSizeExceedsX"), get_lang("FilesSizeExceedsX"),
format_file_size(api_get_setting('message_max_upload_filesize')) format_file_size(api_get_setting('message_max_upload_filesize'))
@ -440,7 +440,7 @@ class MessageManager
if ($directMessage) { if ($directMessage) {
$type = Notification::NOTIFICATION_TYPE_DIRECT_MESSAGE; $type = Notification::NOTIFICATION_TYPE_DIRECT_MESSAGE;
} }
$notification->save_notification( $notification->saveNotification(
$type, $type,
array($receiver_user_id), array($receiver_user_id),
$subject, $subject,
@ -472,7 +472,7 @@ class MessageManager
'group_info' => $group_info, 'group_info' => $group_info,
'user_info' => $sender_info, 'user_info' => $sender_info,
); );
$notification->save_notification( $notification->saveNotification(
Notification::NOTIFICATION_TYPE_GROUP, Notification::NOTIFICATION_TYPE_GROUP,
$new_user_list, $new_user_list,
$subject, $subject,

@ -224,7 +224,7 @@ class Notification extends Model
* @param array $smsParameters * @param array $smsParameters
* *
*/ */
public function save_notification( public function saveNotification(
$type, $type,
$userList, $userList,
$title, $title,

@ -256,7 +256,7 @@ class SocialManager extends UserManager
$sender_info = api_get_user_info($user_id); $sender_info = api_get_user_info($user_id);
$notification = new Notification(); $notification = new Notification();
$notification->save_notification( $notification->saveNotification(
Notification::NOTIFICATION_TYPE_INVITATION, Notification::NOTIFICATION_TYPE_INVITATION,
array($friend_id), array($friend_id),
$message_title, $message_title,

Loading…
Cancel
Save