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

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

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

Loading…
Cancel
Save