diff --git a/classes/time.class.php b/classes/time.class.php index 3139bb54..46871e6c 100644 --- a/classes/time.class.php +++ b/classes/time.class.php @@ -16,11 +16,11 @@ function time_ago($TimeStamp) { return time() - $TimeStamp; } +/* + * Returns a by default but can optionally return the raw time + * difference in text (e.g. "16 hours and 28 minutes", "1 day, 18 hours"). + */ function time_diff($TimeStamp, $Levels = 2, $Span = true, $Lowercase = false) { - /* - Returns a by default but can optionally return the raw time - difference in text (e.g. "16 hours and 28 minutes", "1 day, 18 hours"). - */ if (!is_number($TimeStamp)) { // Assume that $TimeStamp is SQL timestamp if ($TimeStamp == '0000-00-00 00:00:00') { return 'Never'; diff --git a/classes/users.class.php b/classes/users.class.php index d1d22007..66bbc491 100644 --- a/classes/users.class.php +++ b/classes/users.class.php @@ -630,19 +630,19 @@ public static function show_avatar($Avatar, $UserID, $Username, $Setting, $Size if (!empty($AvatarMouseOverText)) { $AvatarMouseOverText = "title=\"$AvatarMouseOverText\" alt=\"$AvatarMouseOverText\""; } else { - $AvatarMouseOverText = "alt=\"\""; + $AvatarMouseOverText = "alt=\"$Username's avatar\""; } if ($EnabledRewards['HasSecondAvatar'] && !empty($Rewards['SecondAvatar'])) { - $SecondAvatar = 'data-gazelle-second-avatar="' . ImageTools::process($Rewards['SecondAvatar']) . '"'; + $SecondAvatar = ' data-gazelle-second-avatar="' . ImageTools::process($Rewards['SecondAvatar']) . '"'; } // case 1 is avatars disabled switch ($Setting) { case 0: if (!empty($Avatar)) { - $ToReturn = ($ReturnHTML ? "" : $Avatar); + $ToReturn = ($ReturnHTML ? "" : $Avatar); } else { $URL = STATIC_SERVER.'common/avatars/default.png'; - $ToReturn = ($ReturnHTML ? "" : $URL); + $ToReturn = ($ReturnHTML ? "" : $URL); } break; case 2: @@ -683,14 +683,14 @@ public static function show_avatar($Avatar, $UserID, $Username, $Setting, $Size $URL = 'https://robohash.org/'.md5($Username)."?set=set$Type&size={$Size}x$Size"; } if ($ShowAvatar == true && !empty($Avatar)) { - $ToReturn = ($ReturnHTML ? "" : $Avatar); + $ToReturn = ($ReturnHTML ? "" : $Avatar); } else { - $ToReturn = ($ReturnHTML ? "" : $URL); + $ToReturn = ($ReturnHTML ? "" : $URL); } break; default: $URL = STATIC_SERVER.'common/avatars/default.png'; - $ToReturn = ($ReturnHTML ? "" : $URL); + $ToReturn = ($ReturnHTML ? "" : $URL); } return $ToReturn; } diff --git a/design/privatefooter.php b/design/privatefooter.php index 5338d013..22d5507a 100644 --- a/design/privatefooter.php +++ b/design/privatefooter.php @@ -31,7 +31,7 @@ Time: =number_format(((microtime(true) - $ScriptStartTime) * 1000), 5)?> ms Used: =Format::get_size(memory_get_usage(true))?> Load: =number_format($Load[0], 2).' '.number_format($Load[1], 2).' '.number_format($Load[2], 2)?> - Date: =date('M d Y, H:i')?> + Date: =date('M d Y')?>, =date('H:i')?>
diff --git a/design/privateheader.php b/design/privateheader.php index 5ac1eb28..1a1cb1dc 100644 --- a/design/privateheader.php +++ b/design/privateheader.php @@ -377,9 +377,9 @@ // Inbox if ($NotificationsManager->is_traditional(NotificationsManager::INBOX)) { $NotificationsManager->load_inbox(); - $NewMessages = $NotificationsManager->get_notifications()[NotificationsManager::INBOX]; - if (isset($NewMessages)) { - $Alerts[] = NotificationsManagerView::format_traditional($NewMessages); + $NewMessages = $NotificationsManager->get_notifications(); + if (isset($NewMessages[NotificationsManager::INBOX])) { + $Alerts[] = NotificationsManagerView::format_traditional($NewMessages[NotificationsManager::INBOX]); } $NotificationsManager->clear_notifications_array(); } @@ -393,9 +393,9 @@ // Torrents if ($NotificationsManager->is_traditional(NotificationsManager::TORRENTS)) { $NotificationsManager->load_torrent_notifications(); - $NewTorrents = $NotificationsManager->get_notifications()[NotificationsManager::TORRENTS]; - if (isset($NewTorrents)) { - $Alerts[] = NotificationsManagerView::format_traditional($NewTorrents); + $NewTorrents = $NotificationsManager->get_notifications(); + if (isset($NewTorrents[NotificationsManager::TORRENTS])) { + $Alerts[] = NotificationsManagerView::format_traditional($NewTorrents[NotificationsManager::TORRENTS]); } $NotificationsManager->clear_notifications_array(); } diff --git a/design/views/generic/reply/quickreply.php b/design/views/generic/reply/quickreply.php index 600784cd..655fada3 100644 --- a/design/views/generic/reply/quickreply.php +++ b/design/views/generic/reply/quickreply.php @@ -94,11 +94,11 @@