|
@@ -4,11 +4,11 @@ if (!empty($LoggedUser['DisableForums'])) {
|
4
|
4
|
}
|
5
|
5
|
|
6
|
6
|
$UnreadSQL = 'AND q.UnRead';
|
7
|
|
-if ($_GET['showall']) {
|
|
7
|
+if ($_GET['showall'] ?? false) {
|
8
|
8
|
$UnreadSQL = '';
|
9
|
9
|
}
|
10
|
10
|
|
11
|
|
-if ($_GET['catchup']) {
|
|
11
|
+if ($_GET['catchup'] ?? false) {
|
12
|
12
|
$DB->query("UPDATE users_notify_quoted SET UnRead = '0' WHERE UserID = '$LoggedUser[ID]'");
|
13
|
13
|
$Cache->delete_value('notify_quoted_' . $LoggedUser['ID']);
|
14
|
14
|
header('Location: userhistory.php?action=quote_notifications');
|
|
@@ -97,54 +97,34 @@ View::show_header('Quote Notifications');
|
97
|
97
|
<br />
|
98
|
98
|
<?
|
99
|
99
|
foreach ($Results as $Result) {
|
100
|
|
- switch ($Result['Page']) {
|
101
|
|
- case 'forums':
|
102
|
|
- $Links = 'Forums: <a href="forums.php?action=viewforum&forumid=' . $Result['ForumID'] . '">' . display_str($Result['ForumName']) . '</a> > ' .
|
103
|
|
- '<a href="forums.php?action=viewthread&threadid=' . $Result['PageID'] . '" class="tooltip" title="' . display_str($Result['ForumTitle']) . '">' . Format::cut_string($Result['ForumTitle'], 75) . '</a>';
|
104
|
|
- $JumpLink = 'forums.php?action=viewthread&threadid=' . $Result['PageID'] . '&postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
|
105
|
|
- break;
|
106
|
|
- case 'artist':
|
107
|
|
- $Links = 'Artist: <a href="artist.php?id=' . $Result['PageID'] . '">' . display_str($Result['ArtistName']) . '</a>';
|
108
|
|
- $JumpLink = 'artist.php?id=' . $Result['PageID'] . '&postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
|
109
|
|
- break;
|
110
|
|
- case 'collages':
|
111
|
|
- $Links = 'Collage: <a href="collages.php?id=' . $Result['PageID'] . '">' . display_str($Result['CollageName']) . '</a>';
|
112
|
|
- $JumpLink = 'collages.php?action=comments&collageid=' . $Result['PageID'] . '&postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
|
113
|
|
- break;
|
114
|
|
- case 'requests':
|
115
|
|
- if (!isset($Requests[$Result['PageID']])) {
|
116
|
|
- // Deleted request
|
117
|
|
- continue 2;
|
118
|
|
- }
|
119
|
|
- $Request = $Requests[$Result['PageID']];
|
120
|
|
- $CategoryName = $Categories[$Request['CategoryID'] - 1];
|
121
|
|
- $Links = 'Request: ';
|
122
|
|
- if ($CategoryName == 'Music') {
|
123
|
|
- $Links .= Artists::display_artists(Requests::get_artists($Result['PageID'])) . '<a href="requests.php?action=view&id=' . $Result['PageID'] . '" dir="ltr">' . $Request['Title'] . " [" . $Request['Year'] . "]</a>";
|
124
|
|
- } elseif ($CategoryName == "Audiobooks" || $CategoryName == "Comedy") {
|
125
|
|
- $Links .= '<a href="requests.php?action=view&id=' . $Result['PageID'] . '" dir="ltr">' . $Request['Title'] . " [" . $Request['Year'] . "]</a>";
|
126
|
|
- } else {
|
127
|
|
- $Links .= '<a href="requests.php?action=view&id=' . $Result['PageID'] . '">' . $Request['Title'] . "</a>";
|
128
|
|
- }
|
129
|
|
- $JumpLink = 'requests.php?action=view&id=' . $Result['PageID'] . '&postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
|
130
|
|
- break;
|
131
|
|
- case 'torrents':
|
132
|
|
- if (!isset($TorrentGroups[$Result['PageID']])) {
|
133
|
|
- // Deleted or moved torrent group
|
134
|
|
- continue 2;
|
135
|
|
- }
|
136
|
|
- $GroupInfo = $TorrentGroups[$Result['PageID']];
|
137
|
|
- $Links = 'Torrent: ' . Artists::display_artists($GroupInfo['ExtendedArtists']) . '<a href="torrents.php?id=' . $GroupInfo['ID'] . '" dir="ltr">' . $GroupInfo['Name'] . '</a>';
|
138
|
|
- if ($GroupInfo['Year'] > 0) {
|
139
|
|
- $Links .= " [" . $GroupInfo['Year'] . "]";
|
140
|
|
- }
|
141
|
|
- if ($GroupInfo['ReleaseType'] > 0) {
|
142
|
|
- $Links .= " [" . $ReleaseTypes[$GroupInfo['ReleaseType']] . "]";
|
143
|
|
- }
|
144
|
|
- $JumpLink = 'torrents.php?id=' . $GroupInfo['ID'] . '&postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
|
145
|
|
- break;
|
146
|
|
- default:
|
147
|
|
- continue 2;
|
|
100
|
+ if ($Result['Page'] == 'forums') {
|
|
101
|
+ $Links = 'Forums: <a href="forums.php?action=viewforum&forumid=' . $Result['ForumID'] . '">' . display_str($Result['ForumName']) . '</a> > ';
|
|
102
|
+ $Links .= '<a href="forums.php?action=viewthread&threadid=' . $Result['PageID'] . '" class="tooltip" title="' . display_str($Result['ForumTitle']) . '">' . Format::cut_string($Result['ForumTitle'], 75) . '</a> > ';
|
|
103
|
+ $Links .= '<a href="forums.php?action=viewthread&threadid=' . $Result['PageID'] . '&postid=' . $Result['PostID'] . '#post' . $Result['PostID'] . '">' . 'Post #' . $Result['PostID'] . '</a>';
|
|
104
|
+ } elseif ($Result['Page'] == 'artist') {
|
|
105
|
+ $Links = 'Artist: <a href="artist.php?id=' . $Result['PageID'] . '">' . display_str($Result['ArtistName']) . '</a> > ';
|
|
106
|
+ $Links .= '<a href="artist.php?id=' . $Result['PageID'] . '&postid=' . $Result['PostID'] . '#post' . $Result['PostID'] . '">Post #' . $Result['PostID'] . '</a>';
|
|
107
|
+ } elseif ($Result['Page'] == 'collages') {
|
|
108
|
+ $Links = 'Collage: <a href="collages.php?id=' . $Result['PageID'] . '">' . display_str($Result['CollageName']) . '</a> > ';
|
|
109
|
+ $Links .= '<a href="collages.php?action=comments&collageid=' . $Result['PageID'] . '&postid=' . $Result['PostID'] . '#post' . $Result['PostID'] . '">Post #' . $Result['PostID'] . '</a>';
|
|
110
|
+ } elseif ($Result['Page'] == 'requests') {
|
|
111
|
+ if (!isset($Requests[$Result['PageID']])) {
|
|
112
|
+ continue;
|
|
113
|
+ }
|
|
114
|
+ $Request = $Requests[$Result['PageID']];
|
|
115
|
+ $CategoryName = $Categories[$Request['CategoryID'] - 1];
|
|
116
|
+ $Links = 'Request: ';
|
|
117
|
+ $Links .= Artists::display_artists(Requests::get_artists($Result['PageID'])) . '<a href="requests.php?action=view&id=' . $Result['PageID'] . '">' . $Request['Title'] . "</a> > ";
|
|
118
|
+ $Links .= '<a href="requests.php?action=view&id=' . $Result['PageID'] . '&postid=' . $Result['PostID'] . '#post' . $Result['PostID'] . '"> Post #' . $Result['PostID'] . '</a>';
|
|
119
|
+ } elseif ($Result['Page'] == 'torrents') {
|
|
120
|
+ if (!isset($TorrentGroups[$Result['PageID']])) {
|
|
121
|
+ continue;
|
|
122
|
+ }
|
|
123
|
+ $GroupInfo = $TorrentGroups[$Result['PageID']];
|
|
124
|
+ $Links = 'Torrent: ' . Artists::display_artists($GroupInfo['ExtendedArtists']) . '<a href="torrents.php?id=' . $GroupInfo['ID'] . '">' . ($GroupInfo['Name'] ? $GroupInfo['Name'] : ($GroupInfo['NameRJ'] ? $GroupInfo['NameRJ'] : $GroupInfo['NameJP'])) . '</a> > ';
|
|
125
|
+ $Links .= '<a href="torrents.php?id=' . $GroupInfo['ID'] . '&postid=' . $Result['PostID'] . '#post' . $Result['PostID'] . '"> Post #' . $Result['PostID'] . '</a>';
|
|
126
|
+ } else {
|
|
127
|
+ continue;
|
148
|
128
|
}
|
149
|
129
|
?>
|
150
|
130
|
<table class="forum_post box vertical_margin noavatar">
|
|
@@ -152,14 +132,11 @@ foreach ($Results as $Result) {
|
152
|
132
|
<td colspan="2">
|
153
|
133
|
<span class="float_left">
|
154
|
134
|
<?=$Links?>
|
155
|
|
- > Quoted by <?=Users::format_username($Result['QuoterID'], false, false, false, false) . ' ' . time_diff($Result['Date']) ?>
|
156
|
135
|
<?=($Result['UnRead'] ? ' <span class="new">(New!)</span>' : '')?>
|
157
|
136
|
</span>
|
158
|
|
- <span class="float_left tooltip last_read" title="Jump to quote">
|
159
|
|
- <a href="<?=$JumpLink?>"></a>
|
160
|
|
- </span>
|
|
137
|
+ <td colspan="1">
|
161
|
138
|
<span class="float_right">
|
162
|
|
- <a href="#">↑</a>
|
|
139
|
+ Quoted by <?=Users::format_username($Result['QuoterID'], false, false, false, false) . ' ' . time_diff($Result['Date']) ?>
|
163
|
140
|
</span>
|
164
|
141
|
</td>
|
165
|
142
|
</tr>
|