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_donate" class="brackets"><a href="donate.php">Donate</a></li>
</ul>
</ul>
<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_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;
}
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);
// 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);
$LastPost = end($Thread);
$LastPost = $LastPost['ID'];
reset($Thread);
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
if (!$ThreadInfo['IsLocked'] || $ThreadInfo['IsSticky']) {
$DB->query("SELECT PostID From forums_last_read_topics WHERE UserID='$LoggedUser[ID]' AND TopicID='$ThreadID'");

View File

@ -157,7 +157,7 @@
<br /><br />
<em><a href="forums.php?action=viewthread&threadid=<?=$ThreadID?>">Discuss this post here</a></em>
<? 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>

View File

@ -72,6 +72,9 @@
$PostNum = 1;
}
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);
// 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);
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

View File

@ -106,14 +106,7 @@ function get_group_info($GroupID, $Return = true, $RevisionID = 0) {
$TorrentList = $DB->to_array();
if(count($TorrentList) == 0) {
//error(404,'','','',true);
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();
error(404);
}
if(in_array(0, $DB->collect('Seeders'))) {
$CacheTime = 600;

View File

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

View File

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

View File

@ -338,7 +338,8 @@ source requests : torrents {
sql_query = SELECT ID, UserID, TimeAdded, LastVote, CategoryID, Title, \
Year, ArtistList, ReleaseType, CatalogueNumber, \
BitrateList, FormatList, MediaList, LogCue, FillerID, \
TorrentID, TimeFilled, Visible, Votes, Bounty \
TorrentID, TimeFilled, Visible, Votes, Bounty, \
Year AS YearFullText \
FROM sphinx_requests
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; \
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
}
@ -375,7 +376,8 @@ source requests_delta : requests {
sql_query = SELECT ID, UserID, TimeAdded, LastVote, CategoryID, Title, \
Year, ArtistList, ReleaseType, CatalogueNumber, \
BitrateList, FormatList, MediaList, LogCue, FillerID, \
TorrentID, TimeFilled, Visible, Votes, Bounty \
TorrentID, TimeFilled, Visible, Votes, Bounty, \
Year AS YearFullText \
FROM sphinx_requests_delta
sql_query_killlist = SELECT ID FROM sphinx_requests_delta

View File

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