Empty commit

This commit is contained in:
Git 2012-04-10 08:00:20 +00:00
parent d48c6dbd3d
commit 5e62b46697
5 changed files with 16 additions and 8 deletions

View File

@ -625,12 +625,6 @@ function show() {
<p class="min_padding">Contains background information such as album history and maybe a review.</p>
</td>
</tr>
<tr>
<td class="label" style="font-weight: bold;">Library Contest Image Location</td>
<td>
<input type="text" id="library_image" name="library_image" size="60" />&nbsp;&nbsp;<input type="checkbox" id="multi_disc" name="multi_disc" />Multi-disc Upload
</td>
</tr>
<? } // if new torrent ?>
<tr>
<td class="label">Release Description (optional)</td>

View File

@ -267,7 +267,7 @@ function user_info($UserID) {
global $DB, $Cache, $Classes;
$UserInfo = $Cache->get_value('user_info_'.$UserID);
// the !isset($UserInfo['Paranoia']) can be removed after a transition period
if(empty($UserInfo) || empty($UserInfo['ID']) || !isset($UserInfo['Paranoia'])) {
if(empty($UserInfo) || empty($UserInfo['ID']) || !isset($UserInfo['Paranoia']) || empty($UserInfo['Class'])) {
$OldQueryID = $DB->get_query_id();
@ -301,6 +301,8 @@ function user_info($UserID) {
}
}
$UserInfo['Class'] = $Classes[$UserInfo['PermissionID']]['Level'];
if (!empty($UserInfo['Levels'])) {
$UserInfo['ExtraClasses'] = array_fill_keys(explode(',', $UserInfo['Levels']), 1);
} else {

View File

@ -137,7 +137,7 @@
JOIN forums_last_read_topics AS l ON s.UserID = l.UserID AND s.TopicID = l.TopicID
JOIN forums_topics AS t ON l.TopicID = t.ID
JOIN forums AS f ON t.ForumID = f.ID
WHERE (f.MinClassRead <= ".$LoggedUser['EffectiveClass']." OR f.ID IN ('$PermittedForums'))
WHERE (f.MinClassRead <= ".$LoggedUser['Class']." OR f.ID IN ('$PermittedForums'))
AND l.PostID < t.LastPostID
AND s.UserID = ".$LoggedUser['ID'].
(!empty($RestrictedForums) ? "

View File

@ -352,6 +352,7 @@
<input type="hidden" id="amount" name="amount" value="0">
<input type="hidden" id="current_uploaded" value="<?=$LoggedUser['BytesUploaded']?>" />
<input type="hidden" id="current_downloaded" value="<?=$LoggedUser['BytesDownloaded']?>" />
<input type="hidden" id="current_rr" value="<?=(float)$LoggedUser['RequiredRatio']?>" />
<input id="total_bounty" type="hidden" value="<?=$RequestVotes['TotalBounty']?>" />
If you add the entered <strong><span id="new_bounty">0.00 MB</span></strong> of bounty, your new stats will be: <br/>
Uploaded: <span id="new_uploaded"><?=get_size($LoggedUser['BytesUploaded'])?></span>

View File

@ -19,6 +19,17 @@ function Vote(amount, requestid) {
index = true;
}
if (amount > 20*1024*1024) {
upload = $('#current_uploaded').raw().value;
download = $('#current_downloaded').raw().value;
rr = $('#current_rr').raw().value;
if (amount > .3*(upload - rr * download)) {
if(!confirm('This vote is more than 30% of your buffer. Please confirm that you wish to place this large a vote.')) {
return false;
}
}
}
ajax.get('requests.php?action=takevote&id=' + requestid + '&auth=' + $('#auth').raw().value + '&amount=' + amount, function (response) {
if(response == 'bankrupt') {
error_message("You do not have sufficient upload credit to add " + get_size(amount) + " to this request");