In this example, Rippy has snatched 90 torrents, and is currently seeding 45 torrents.
To calculate Rippy's actual required ratio, we take his maximum required ratio (0% seeded), which is 0.30, and multiply it by [1 - seeding/snatched] (which is 0.50). Written out:
- 0.05 * [1 - (45/90)] = 0.15.
+ 0.3 * [1 - (45/90)] = 0.15.
The resulting required ratio is 0.15, which falls between the maximum required ratio of 0.30 and the minimum required ratio of 0.05 for his amount downloaded bracket.
If Rippy's on-site required ratio was listed as a value greater than the calculated value, this would be because he hadn't seeded those 45 torrents for a 72 hour period in the
diff --git a/sections/schedule/index.php b/sections/schedule/index.php
index 24dfe2ba..0bc7bf2e 100644
--- a/sections/schedule/index.php
+++ b/sections/schedule/index.php
@@ -619,7 +619,7 @@ function next_hour() {
FROM forums_topics AS t
JOIN forums AS f ON t.ForumID = f.ID
WHERE t.IsLocked='0' AND t.IsSticky='0'
- AND t.LastPostTime<'".time_minus(3600*24*28)."'
+ AND DATEDIFF(CURDATE(),DATE(t.LastPostTime))/7>f.AutoLockWeeks
AND f.AutoLock = '1'");
$IDs = $DB->collect('ID');
diff --git a/sections/tools/managers/forum_alter.php b/sections/tools/managers/forum_alter.php
index c5bcfdd4..ff0716fc 100644
--- a/sections/tools/managers/forum_alter.php
+++ b/sections/tools/managers/forum_alter.php
@@ -42,12 +42,13 @@
MinClassRead='$P[minclassread]',
MinClassWrite='$P[minclasswrite]',
MinClassCreate='$P[minclasscreate]',
- AutoLock='$P[autolock]'
+ AutoLock='$P[autolock]',
+ AutoLockWeeks='$P[autolockweeks]'
WHERE ID='$P[id]'");
} else { //Create
$DB->query("INSERT INTO forums
- (Sort, CategoryID, Name, Description, MinClassRead, MinClassWrite, MinClassCreate, AutoLock) VALUES
- ('$P[sort]', '$P[categoryid]', '$P[name]','$P[description]','$P[minclassread]','$P[minclasswrite]','$P[minclasscreate]','$P[autolock]')");
+ (Sort, CategoryID, Name, Description, MinClassRead, MinClassWrite, MinClassCreate, AutoLock, AutoLockWeeks) VALUES
+ ('$P[sort]', '$P[categoryid]', '$P[name]','$P[description]','$P[minclassread]','$P[minclasswrite]','$P[minclasscreate]','$P[autolock]','$P[autolockweeks]')");
}
}
diff --git a/sections/tools/managers/forum_list.php b/sections/tools/managers/forum_list.php
index 2a26b667..0190abf8 100644
--- a/sections/tools/managers/forum_list.php
+++ b/sections/tools/managers/forum_list.php
@@ -44,11 +44,13 @@ function class_list($Selected=0){
MinClassRead,
MinClassWrite,
MinClassCreate,
- AutoLock
+ AutoLock,
+ AutoLockWeeks
FROM forums
ORDER BY CategoryID, Sort ASC');
?>
+
Forum control panel
@@ -61,11 +63,12 @@ function class_list($Selected=0){