From 23684501b2d83c9e4958b1e0a0a35b53cfae563a Mon Sep 17 00:00:00 2001 From: Git Date: Sun, 30 Dec 2012 08:00:23 +0000 Subject: [PATCH] Empty commit --- sections/rules/ratio.php | 2 +- sections/schedule/index.php | 2 +- sections/tools/managers/forum_alter.php | 7 ++++--- sections/tools/managers/forum_list.php | 13 +++++++++++-- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/sections/rules/ratio.php b/sections/rules/ratio.php index 51ddcd66..3fd54c81 100644 --- a/sections/rules/ratio.php +++ b/sections/rules/ratio.php @@ -155,7 +155,7 @@
  • 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){ + next_record()){ +while(list($ID, $CategoryID, $Sort, $Name, $Description, $MinClassRead, $MinClassWrite, $MinClassCreate, $AutoLock, $AutoLockWeeks) = $DB->next_record()){ $Row = ($Row === 'a' ? 'b' : 'a'); ?> @@ -109,6 +112,9 @@ function class_list($Selected=0){ + +
    Min class write Min class create AutolockAutolock weeks Submit
    /> + + @@ -161,6 +167,9 @@ function class_list($Selected=0){ + +