Empty commit

This commit is contained in:
Git 2013-06-30 08:00:49 +00:00
parent 2d10e5bea9
commit 649323668c
2 changed files with 27 additions and 23 deletions

View File

@ -200,10 +200,10 @@
FROM users_notify_quoted AS q FROM users_notify_quoted AS q
LEFT JOIN forums_topics AS t ON t.ID = q.PageID LEFT JOIN forums_topics AS t ON t.ID = q.PageID
LEFT JOIN forums AS f ON f.ID = t.ForumID LEFT JOIN forums AS f ON f.ID = t.ForumID
WHERE q.UserID=$LoggedUser[ID] WHERE q.UserID = $LoggedUser[ID]
AND q.UnRead=1 AND q.UnRead = 1
AND q.Page = 'forums' AND q.Page = 'forums'
AND ((f.MinClassRead<='$LoggedUser[Class]'"; AND ((f.MinClassRead <= '$LoggedUser[Class]'";
if (!empty($RestrictedForums)) { if (!empty($RestrictedForums)) {
$sql .= " AND f.ID NOT IN ('$RestrictedForums')"; $sql .= " AND f.ID NOT IN ('$RestrictedForums')";
} }
@ -299,7 +299,7 @@
$DB->query(" $DB->query("
SELECT COUNT(ID) SELECT COUNT(ID)
FROM staff_pm_conversations FROM staff_pm_conversations
WHERE UserID='".$LoggedUser['ID']."' WHERE UserID = '".$LoggedUser['ID']."'
AND Unread = '1'"); AND Unread = '1'");
list($NewStaffPMs) = $DB->next_record(); list($NewStaffPMs) = $DB->next_record();
$Cache->cache_value('staff_pm_new_'.$LoggedUser['ID'], $NewStaffPMs, 0); $Cache->cache_value('staff_pm_new_'.$LoggedUser['ID'], $NewStaffPMs, 0);
@ -315,7 +315,7 @@
$DB->query(" $DB->query("
SELECT COUNT(UnRead) SELECT COUNT(UnRead)
FROM pm_conversations_users FROM pm_conversations_users
WHERE UserID='".$LoggedUser['ID']."' WHERE UserID = '".$LoggedUser['ID']."'
AND UnRead = '1' AND UnRead = '1'
AND InInbox = '1'"); AND InInbox = '1'");
list($NewMessages) = $DB->next_record(); list($NewMessages) = $DB->next_record();
@ -338,12 +338,16 @@
$DB->query(" $DB->query("
SELECT COUNT(UserID) SELECT COUNT(UserID)
FROM users_notify_torrents FROM users_notify_torrents
WHERE UserID='$LoggedUser[ID]' WHERE UserID = '$LoggedUser[ID]'
AND UnRead='1'"); AND UnRead = '1'");
list($NewNotifications) = $DB->next_record(); list($NewNotifications) = $DB->next_record();
/* if ($NewNotifications && !check_perms('site_torrents_notify')) { /* if ($NewNotifications && !check_perms('site_torrents_notify')) {
$DB->query("DELETE FROM users_notify_torrents WHERE UserID='$LoggedUser[ID]'"); $DB->query("
$DB->query("DELETE FROM users_notify_filters WHERE UserID='$LoggedUser[ID]'"); DELETE FROM users_notify_torrents
WHERE UserID = '$LoggedUser[ID]'");
$DB->query("
DELETE FROM users_notify_filters
WHERE UserID = '$LoggedUser[ID]'");
} */ } */
$Cache->cache_value('notifications_new_'.$LoggedUser['ID'], $NewNotifications, 0); $Cache->cache_value('notifications_new_'.$LoggedUser['ID'], $NewNotifications, 0);
} }
@ -381,17 +385,17 @@
$DB->query(" $DB->query("
SELECT COUNT(ID) SELECT COUNT(ID)
FROM staff_pm_conversations FROM staff_pm_conversations
WHERE Status='Unanswered' WHERE Status = 'Unanswered'
AND (AssignedToUser=".$LoggedUser['ID']." AND (AssignedToUser = ".$LoggedUser['ID']."
OR (Level >= ".max(700,$Classes[MOD]['Level'])." OR (Level >= ".max(700, $Classes[MOD]['Level'])."
AND Level <=".$LoggedUser['Class']."))"); AND Level <= ".$LoggedUser['Class']."))");
} }
if ($LoggedUser['PermissionID'] == FORUM_MOD) { if ($LoggedUser['PermissionID'] == FORUM_MOD) {
$DB->query(" $DB->query("
SELECT COUNT(ID) SELECT COUNT(ID)
FROM staff_pm_conversations FROM staff_pm_conversations
WHERE Status='Unanswered' WHERE Status='Unanswered'
AND (AssignedToUser=".$LoggedUser['ID']." AND (AssignedToUser = ".$LoggedUser['ID']."
OR Level = '". $Classes[FORUM_MOD]['Level'] . "')"); OR Level = '". $Classes[FORUM_MOD]['Level'] . "')");
} }
list($NumStaffPMs) = $DB->next_record(); list($NumStaffPMs) = $DB->next_record();
@ -409,7 +413,7 @@
$DB->query(" $DB->query("
SELECT COUNT(ID) SELECT COUNT(ID)
FROM reportsv2 FROM reportsv2
WHERE Status='New'"); WHERE Status = 'New'");
list($NumTorrentReports) = $DB->next_record(); list($NumTorrentReports) = $DB->next_record();
$Cache->cache_value('num_torrent_reportsv2', $NumTorrentReports, 0); $Cache->cache_value('num_torrent_reportsv2', $NumTorrentReports, 0);
} }
@ -422,7 +426,7 @@
$DB->query(" $DB->query("
SELECT COUNT(ID) SELECT COUNT(ID)
FROM reports FROM reports
WHERE Status='New'"); WHERE Status = 'New'");
list($NumOtherReports) = $DB->next_record(); list($NumOtherReports) = $DB->next_record();
$Cache->cache_value('num_other_reports', $NumOtherReports, 0); $Cache->cache_value('num_other_reports', $NumOtherReports, 0);
} }
@ -436,7 +440,7 @@
$DB->query(" $DB->query("
SELECT COUNT(ID) SELECT COUNT(ID)
FROM reports FROM reports
WHERE Status='New' WHERE Status = 'New'
AND Type = 'request_update'"); AND Type = 'request_update'");
list($NumUpdateReports) = $DB->next_record(); list($NumUpdateReports) = $DB->next_record();
$Cache->cache_value('num_update_reports', $NumUpdateReports, 0); $Cache->cache_value('num_update_reports', $NumUpdateReports, 0);
@ -451,7 +455,7 @@
$DB->query(" $DB->query("
SELECT COUNT(ID) SELECT COUNT(ID)
FROM reports FROM reports
WHERE Status='New' WHERE Status = 'New'
AND Type IN('artist_comment', 'collages_comment', 'post', 'requests_comment', 'thread', 'torrents_comment')"); AND Type IN('artist_comment', 'collages_comment', 'post', 'requests_comment', 'thread', 'torrents_comment')");
list($NumForumReports) = $DB->next_record(); list($NumForumReports) = $DB->next_record();
$Cache->cache_value('num_forum_reports', $NumForumReports, 0); $Cache->cache_value('num_forum_reports', $NumForumReports, 0);
@ -471,7 +475,7 @@
<div class="alertbar"><?=$Alert?></div> <div class="alertbar"><?=$Alert?></div>
<? } <? }
if (!empty($ModBar)) { ?> if (!empty($ModBar)) { ?>
<div class="alertbar blend"><?=implode(' | ',$ModBar)?></div> <div class="alertbar blend"><?=implode(' | ', $ModBar)?></div>
<? } ?> <? } ?>
</div> </div>
<? <?

View File

@ -696,11 +696,11 @@ function header_link($SortKey,$DefaultWay = 'desc') {
'tags' => $TagList, 'tags' => $TagList,
'category' => $Categories[$CategoryID-1], 'category' => $Categories[$CategoryID-1],
'fileCount' => (int) $Data['FileCount'], 'fileCount' => (int) $Data['FileCount'],
'groupTime' => $GroupTime, 'groupTime' => (string) strtotime($Data['Time']),
'size' => (int) $Data['Size'], 'size' => (int) $Data['Size'],
'snatches' => (int) $TotalSnatched, 'snatches' => (int) $Data['Snatched'],
'seeders' => (int) $TotalSeeders, 'seeders' => (int) $Data['Seeders'],
'leechers' => (int) $TotalLeechers, 'leechers' => (int) $Data['Leechers'],
'isFreeleech' => $Data['FreeTorrent'] == '1', 'isFreeleech' => $Data['FreeTorrent'] == '1',
'isNeutralLeech' => $Data['FreeTorrent'] == '2', 'isNeutralLeech' => $Data['FreeTorrent'] == '2',
'isPersonalFreeleech' => $Data['PersonalFL'], 'isPersonalFreeleech' => $Data['PersonalFL'],