Empty commit

This commit is contained in:
Git 2012-01-31 08:00:23 +00:00
parent 4942f451a3
commit 22c29ba0e1
6 changed files with 22 additions and 6 deletions

View File

@ -2090,7 +2090,7 @@ function update_tracker($Action, $Updates, $ToIRC = false) {
$ResHeader = '';
do {
$ResHeader .= fread($File, 1);
} while (!ends_with($ResHeader, "\r\n\r\n"));
} while (!feof($File) && !ends_with($ResHeader, "\r\n\r\n"));
$Response = '';
while($Line = fgets($File)) {

View File

@ -1,5 +1,7 @@
<?
authorize(true);
$RequestTax = 0.1;
// Minimum and default amount of upload to remove from the user when they vote.

View File

@ -2,6 +2,8 @@
authorize(true);
include(SERVER_ROOT.'/sections/requests/functions.php');
$Queries = array();
$OrderWays = array('year', 'votes', 'bounty', 'created', 'lastvote', 'filled');

View File

@ -622,6 +622,7 @@ function next_hour() {
$Cache->expire_value('thread_'.$TopicID.'_info',3600*24*30);
}
}
echo "Old threads locked\n";
//------------- Delete dead torrents ------------------------------------//
@ -651,6 +652,7 @@ function next_hour() {
OR t.Time < '".time_minus(3600*24*2)."'
AND t.last_action = 0");
$TorrentIDs = $DB->to_array();
echo "Found ".count($TorrentIDs)." inactive torrents to be deleted.\n";
$LogEntries = array();
@ -680,7 +682,11 @@ function next_hour() {
$DeleteNotes[$UserID]['Count']++;
++$i;
if ($i % 500 == 0) {
echo "$i inactive torrents removed.\n";
}
}
echo "$i torrents deleted for inactivity.\n";
foreach($DeleteNotes as $UserID => $MessageInfo){
$Singular = ($MessageInfo['Count'] == 1) ? true : false;
@ -766,7 +772,7 @@ function next_hour() {
$AddExtra='';
if($Format) { $ExtraInfo.=$Format; $AddExtra=' / '; }
if($Encoding) { $ExtraInfo.=$AddExtra.$Encoding; $AddExtra=' / '; }
"FLAC / Lossless / Log (100%) / Cue / CD";
// "FLAC / Lossless / Log (100%) / Cue / CD";
if($HasLog) { $ExtraInfo.=$AddExtra."Log (".$LogScore."%)"; $AddExtra=' / '; }
if($HasCue) { $ExtraInfo.=$AddExtra."Cue"; $AddExtra=' / '; }
if($Media) { $ExtraInfo.=$AddExtra.$Media; $AddExtra=' / '; }
@ -851,7 +857,7 @@ function next_hour() {
$AddExtra='';
if($Format) { $ExtraInfo.=$Format; $AddExtra=' / '; }
if($Encoding) { $ExtraInfo.=$AddExtra.$Encoding; $AddExtra=' / '; }
"FLAC / Lossless / Log (100%) / Cue / CD";
// "FLAC / Lossless / Log (100%) / Cue / CD";
if($HasLog) { $ExtraInfo.=$AddExtra."Log (".$LogScore."%)"; $AddExtra=' / '; }
if($HasCue) { $ExtraInfo.=$AddExtra."Cue"; $AddExtra=' / '; }
if($Media) { $ExtraInfo.=$AddExtra.$Media; $AddExtra=' / '; }

View File

@ -118,7 +118,8 @@
DisableIRC,
m.RequiredRatio,
m.FLTokens,
i.RatioWatchEnds
i.RatioWatchEnds,
SHA1(i.AdminComment) AS CommentHash
FROM users_main AS m
JOIN users_info AS i ON i.UserID = m.ID
LEFT JOIN permissions AS p ON p.ID=m.PermissionID
@ -129,6 +130,9 @@
}
$Cur = $DB->next_record(MYSQLI_ASSOC, false);
if ($_POST['comment_hash'] != $Cur['CommentHash']) {
error("Somebody else has moderated this user since you loaded it. Please go back and refresh the page.");
}
//NOW that we know the class of the current user, we can see if one staff member is trying to hax0r us.
if(!check_perms('users_mod', $Cur['Class'])) {

View File

@ -60,7 +60,8 @@
i.DisableIRC,
i.DisableRequests,
i.HideCountryChanges,
m.FLTokens
m.FLTokens,
SHA1(i.AdminComment)
FROM users_main AS m
JOIN users_info AS i ON i.UserID = m.ID
LEFT JOIN users_main AS inviter ON i.Inviter = inviter.ID
@ -72,7 +73,7 @@
header("Location: log.php?search=User+".$UserID);
}
list($Username, $Email, $LastAccess, $IP, $Class, $Uploaded, $Downloaded, $RequiredRatio, $CustomTitle, $torrent_pass, $Enabled, $Paranoia, $Invites, $DisableLeech, $Visible, $JoinDate, $Info, $Avatar, $Country, $AdminComment, $Donor, $Artist, $Warned, $SupportFor, $RestrictedForums, $PermittedForums, $InviterID, $InviterName, $ForumPosts, $RatioWatchEnds, $RatioWatchDownload, $DisableAvatar, $DisableInvites, $DisablePosting, $DisableForums, $DisableTagging, $DisableUpload, $DisableWiki, $DisablePM, $DisableIRC, $DisableRequests, $DisableCountry, $FLTokens) = $DB->next_record(MYSQLI_NUM, array(8,11));
list($Username, $Email, $LastAccess, $IP, $Class, $Uploaded, $Downloaded, $RequiredRatio, $CustomTitle, $torrent_pass, $Enabled, $Paranoia, $Invites, $DisableLeech, $Visible, $JoinDate, $Info, $Avatar, $Country, $AdminComment, $Donor, $Artist, $Warned, $SupportFor, $RestrictedForums, $PermittedForums, $InviterID, $InviterName, $ForumPosts, $RatioWatchEnds, $RatioWatchDownload, $DisableAvatar, $DisableInvites, $DisablePosting, $DisableForums, $DisableTagging, $DisableUpload, $DisableWiki, $DisablePM, $DisableIRC, $DisableRequests, $DisableCountry, $FLTokens, $CommentHash) = $DB->next_record(MYSQLI_NUM, array(8,11));
} else { // Person viewing is a normal user
$DB->query("SELECT
m.Username,
@ -913,6 +914,7 @@ function check_paranoia_here($Setting) {
<div class="box">
<div class="head">Staff Notes <a href="#" name="admincommentbutton" onclick="ChangeTo('text'); return false;">(Edit)</a></div>
<div class="pad">
<input type="hidden" name="comment_hash" value="<?=$CommentHash?>">
<div id="admincommentlinks" class="AdminComment box" style="width:98%;"><?=$Text->full_format($AdminComment)?></div>
<textarea id="admincomment" onkeyup="resize('admincomment');" class="AdminComment hidden" name="AdminComment" cols="65" rows="26" style="width:98%;"><?=display_str($AdminComment)?></textarea>
<a href="#" name="admincommentbutton" onclick="ChangeTo('text'); return false;">Toggle Edit</a>