diff --git a/design/privateheader.php b/design/privateheader.php
index 6bfcc0c0..29e272c2 100644
--- a/design/privateheader.php
+++ b/design/privateheader.php
@@ -112,7 +112,8 @@
?>
Invite=$Invites?>
Donate
-
+
+
- Up: =get_size($LoggedUser['BytesUploaded'])?>
- Down: =get_size($LoggedUser['BytesDownloaded'])?>
diff --git a/sections/ajax/forum/thread.php b/sections/ajax/forum/thread.php
index 35c18723..6ec8b27a 100644
--- a/sections/ajax/forum/thread.php
+++ b/sections/ajax/forum/thread.php
@@ -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'");
diff --git a/sections/blog/index.php b/sections/blog/index.php
index 2951493f..fb2c7227 100644
--- a/sections/blog/index.php
+++ b/sections/blog/index.php
@@ -157,7 +157,7 @@
Discuss this post here
if(check_perms('admin_manage_blog')) { ?>
- [Dead]
+ [Remove link]
}
} ?>
diff --git a/sections/forums/thread.php b/sections/forums/thread.php
index daff7509..13d19289 100644
--- a/sections/forums/thread.php
+++ b/sections/forums/thread.php
@@ -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
diff --git a/sections/torrents/functions.php b/sections/torrents/functions.php
index a19bfd8f..6e8b9678 100644
--- a/sections/torrents/functions.php
+++ b/sections/torrents/functions.php
@@ -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;
diff --git a/sections/torrents/index.php b/sections/torrents/index.php
index ad4a8a8a..f5218589 100644
--- a/sections/torrents/index.php
+++ b/sections/torrents/index.php
@@ -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');
diff --git a/sections/user/user.php b/sections/user/user.php
index 3545dbb6..42c9761b 100644
--- a/sections/user/user.php
+++ b/sections/user/user.php
@@ -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']) {
diff --git a/sphinx.conf b/sphinx.conf
index c4be7089..0b082cd8 100644
--- a/sphinx.conf
+++ b/sphinx.conf
@@ -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
diff --git a/static/styles/mono/style.css b/static/styles/mono/style.css
index dd44ee2a..cda5ece3 100644
--- a/static/styles/mono/style.css
+++ b/static/styles/mono/style.css
@@ -162,7 +162,7 @@ h3 {
}
#userinfo_major {
- width: 245px;
+ width: 265px;
right: 0;
z-index: 1;
text-align: center;