Empty commit

This commit is contained in:
Git 2012-07-17 08:00:18 +00:00
parent a7298a44cd
commit 29bc41ef79
9 changed files with 28 additions and 21 deletions

View File

@ -112,7 +112,8 @@
?> ?>
<li id="nav_invite" class="brackets"><a href="user.php?action=invite">Invite<?=$Invites?></a></li> <li id="nav_invite" class="brackets"><a href="user.php?action=invite">Invite<?=$Invites?></a></li>
<li id="nav_donate" class="brackets"><a href="donate.php">Donate</a></li> <li id="nav_donate" class="brackets"><a href="donate.php">Donate</a></li>
</ul>
</ul>
<ul id="userinfo_stats"> <ul id="userinfo_stats">
<li id="stats_seeding"><a href="torrents.php?type=seeding&amp;userid=<?=$LoggedUser['ID']?>">Up</a>: <span class="stat"><?=get_size($LoggedUser['BytesUploaded'])?></span></li> <li id="stats_seeding"><a href="torrents.php?type=seeding&amp;userid=<?=$LoggedUser['ID']?>">Up</a>: <span class="stat"><?=get_size($LoggedUser['BytesUploaded'])?></span></li>
<li id="stats_leeching"><a href="torrents.php?type=leeching&amp;userid=<?=$LoggedUser['ID']?>">Down</a>: <span class="stat"><?=get_size($LoggedUser['BytesDownloaded'])?></span></li> <li id="stats_leeching"><a href="torrents.php?type=leeching&amp;userid=<?=$LoggedUser['ID']?>">Down</a>: <span class="stat"><?=get_size($LoggedUser['BytesDownloaded'])?></span></li>

View File

@ -74,6 +74,9 @@
$PostNum = 1; $PostNum = 1;
} }
list($Page,$Limit) = page_limit($PerPage, min($ThreadInfo['Posts'],$PostNum)); list($Page,$Limit) = page_limit($PerPage, min($ThreadInfo['Posts'],$PostNum));
if(($Page-1)*$PerPage > $ThreadInfo['Posts']) {
$Page = ceil($ThreadInfo['Posts']/$PerPage);
}
list($CatalogueID,$CatalogueLimit) = catalogue_limit($Page,$PerPage,THREAD_CATALOGUE); list($CatalogueID,$CatalogueLimit) = catalogue_limit($Page,$PerPage,THREAD_CATALOGUE);
// Cache catalogue from which the page is selected, allows block caches and future ability to specify posts per page // Cache catalogue from which the page is selected, allows block caches and future ability to specify posts per page
@ -95,11 +98,13 @@
} }
$Thread = catalogue_select($Catalogue,$Page,$PerPage,THREAD_CATALOGUE); $Thread = catalogue_select($Catalogue,$Page,$PerPage,THREAD_CATALOGUE);
$LastPost = end($Thread);
$LastPost = $LastPost['ID'];
reset($Thread);
if ($_GET['updatelastread'] != '0') { if ($_GET['updatelastread'] != '0') {
$LastPost = end($Thread);
$LastPost = $LastPost['ID'];
reset($Thread);
if($ThreadInfo['Posts'] <= $PerPage*$Page && $ThreadInfo['StickyPostID'] > $LastPost) {
$LastPost = $ThreadInfo['StickyPostID'];
}
//Handle last read //Handle last read
if (!$ThreadInfo['IsLocked'] || $ThreadInfo['IsSticky']) { if (!$ThreadInfo['IsLocked'] || $ThreadInfo['IsSticky']) {
$DB->query("SELECT PostID From forums_last_read_topics WHERE UserID='$LoggedUser[ID]' AND TopicID='$ThreadID'"); $DB->query("SELECT PostID From forums_last_read_topics WHERE UserID='$LoggedUser[ID]' AND TopicID='$ThreadID'");

View File

@ -157,7 +157,7 @@
<br /><br /> <br /><br />
<em><a href="forums.php?action=viewthread&threadid=<?=$ThreadID?>">Discuss this post here</a></em> <em><a href="forums.php?action=viewthread&threadid=<?=$ThreadID?>">Discuss this post here</a></em>
<? if(check_perms('admin_manage_blog')) { ?> <? if(check_perms('admin_manage_blog')) { ?>
<a href="blog.php?action=deadthread&amp;id=<?=$BlogID?>&amp;auth=<?=$LoggedUser['AuthKey']?>">[Dead]</a> <a href="blog.php?action=deadthread&amp;id=<?=$BlogID?>&amp;auth=<?=$LoggedUser['AuthKey']?>">[Remove link]</a>
<? } <? }
} ?> } ?>
</div> </div>

View File

@ -72,6 +72,9 @@
$PostNum = 1; $PostNum = 1;
} }
list($Page,$Limit) = page_limit($PerPage, min($ThreadInfo['Posts'],$PostNum)); list($Page,$Limit) = page_limit($PerPage, min($ThreadInfo['Posts'],$PostNum));
if(($Page-1)*$PerPage > $ThreadInfo['Posts']) {
$Page = ceil($ThreadInfo['Posts']/$PerPage);
}
list($CatalogueID,$CatalogueLimit) = catalogue_limit($Page,$PerPage,THREAD_CATALOGUE); list($CatalogueID,$CatalogueLimit) = catalogue_limit($Page,$PerPage,THREAD_CATALOGUE);
// Cache catalogue from which the page is selected, allows block caches and future ability to specify posts per page // Cache catalogue from which the page is selected, allows block caches and future ability to specify posts per page
@ -95,10 +98,13 @@
} }
$Thread = catalogue_select($Catalogue,$Page,$PerPage,THREAD_CATALOGUE); $Thread = catalogue_select($Catalogue,$Page,$PerPage,THREAD_CATALOGUE);
if ($_GET['updatelastread'] != '0') { if($_GET['updatelastread'] != '0') {
$LastPost = end($Thread); $LastPost = end($Thread);
$LastPost = $LastPost['ID']; $LastPost = $LastPost['ID'];
reset($Thread); reset($Thread);
if($ThreadInfo['Posts'] <= $PerPage*$Page && $ThreadInfo['StickyPostID'] > $LastPost) {
$LastPost = $ThreadInfo['StickyPostID'];
}
//Handle last read //Handle last read

View File

@ -106,14 +106,7 @@ function get_group_info($GroupID, $Return = true, $RevisionID = 0) {
$TorrentList = $DB->to_array(); $TorrentList = $DB->to_array();
if(count($TorrentList) == 0) { if(count($TorrentList) == 0) {
//error(404,'','','',true); error(404);
if(isset($_GET['torrentid']) && is_number($_GET['torrentid'])) {
error("Cannot find the torrent with the ID ".$_GET['torrentid']);
header("Location: log.php?search=Torrent+".$_GET['torrentid']);
} else {
error(404);
}
die();
} }
if(in_array(0, $DB->collect('Seeders'))) { if(in_array(0, $DB->collect('Seeders'))) {
$CacheTime = 600; $CacheTime = 600;

View File

@ -409,7 +409,7 @@ function js_pages($Action, $TorrentID, $NumResults, $CurrentPage) {
if($GroupID) { if($GroupID) {
header("Location: torrents.php?id=".$GroupID."&torrentid=".$_GET['torrentid']."#torrent".$_GET['torrentid']); header("Location: torrents.php?id=".$GroupID."&torrentid=".$_GET['torrentid']."#torrent".$_GET['torrentid']);
} else { } else {
header("Location: log.php?search=Torrent+".$_GET['torrentid']); error(404);
} }
} elseif(!empty($_GET['type'])) { } elseif(!empty($_GET['type'])) {
include(SERVER_ROOT.'/sections/torrents/user.php'); include(SERVER_ROOT.'/sections/torrents/user.php');

View File

@ -7,7 +7,7 @@
include(SERVER_ROOT.'/classes/class_image_tools.php'); include(SERVER_ROOT.'/classes/class_image_tools.php');
if (empty($_GET['id']) || !is_numeric($_GET['id'])) if (empty($_GET['id']) || !is_numeric($_GET['id']))
error(0); error(404);
$UserID = $_GET['id']; $UserID = $_GET['id'];
if($UserID == $LoggedUser['ID']) { if($UserID == $LoggedUser['ID']) {

View File

@ -338,7 +338,8 @@ source requests : torrents {
sql_query = SELECT ID, UserID, TimeAdded, LastVote, CategoryID, Title, \ sql_query = SELECT ID, UserID, TimeAdded, LastVote, CategoryID, Title, \
Year, ArtistList, ReleaseType, CatalogueNumber, \ Year, ArtistList, ReleaseType, CatalogueNumber, \
BitrateList, FormatList, MediaList, LogCue, FillerID, \ BitrateList, FormatList, MediaList, LogCue, FillerID, \
TorrentID, TimeFilled, Visible, Votes, Bounty \ TorrentID, TimeFilled, Visible, Votes, Bounty, \
Year AS YearFullText \
FROM sphinx_requests FROM sphinx_requests
sql_query_post = DELETE FROM sphinx_requests_delta WHERE TimeAdded<=UNIX_TIMESTAMP(@StartTime) sql_query_post = DELETE FROM sphinx_requests_delta WHERE TimeAdded<=UNIX_TIMESTAMP(@StartTime)
@ -364,7 +365,7 @@ source requests : torrents {
sql_attr_multi = uint Voter from query; \ sql_attr_multi = uint Voter from query; \
SELECT RequestID AS ID, UserID FROM requests_votes SELECT RequestID AS ID, UserID FROM requests_votes
sql_attr_multi = uint Bookmarker from query; \ sql_attr_multi = uint Bookmarker from query; \
SELECT RequestID AS ID, UserID FROM bookmarks_requests SELECT RequestID AS ID, UserID FROM bookmarks_requests
} }
@ -375,7 +376,8 @@ source requests_delta : requests {
sql_query = SELECT ID, UserID, TimeAdded, LastVote, CategoryID, Title, \ sql_query = SELECT ID, UserID, TimeAdded, LastVote, CategoryID, Title, \
Year, ArtistList, ReleaseType, CatalogueNumber, \ Year, ArtistList, ReleaseType, CatalogueNumber, \
BitrateList, FormatList, MediaList, LogCue, FillerID, \ BitrateList, FormatList, MediaList, LogCue, FillerID, \
TorrentID, TimeFilled, Visible, Votes, Bounty \ TorrentID, TimeFilled, Visible, Votes, Bounty, \
Year AS YearFullText \
FROM sphinx_requests_delta FROM sphinx_requests_delta
sql_query_killlist = SELECT ID FROM sphinx_requests_delta sql_query_killlist = SELECT ID FROM sphinx_requests_delta

View File

@ -162,7 +162,7 @@ h3 {
} }
#userinfo_major { #userinfo_major {
width: 245px; width: 265px;
right: 0; right: 0;
z-index: 1; z-index: 1;
text-align: center; text-align: center;