Empty commit

This commit is contained in:
Git 2011-10-18 08:00:10 +00:00
parent 5f6fe896fa
commit 9b3191d0e7
8 changed files with 39 additions and 34 deletions

View File

@ -80,6 +80,7 @@
'torrents_delete_fast' => 'Can delete more than 3 torrents at a time.',
'torrents_freeleech' => 'Can make torrents freeleech.',
'torrents_search_fast' => 'Rapid search (for scripts).',
'torrents_hide_dnu' => 'Hide the Do Not Upload list by default.',
'admin_manage_news' => 'Can manage news.',
'admin_manage_blog' => 'Can manage blog.',
'admin_manage_polls' => 'Can manage polls.',
@ -139,6 +140,8 @@ function permissions_form(){ ?>
<? display_perm('site_send_unlimited_invites', 'Can send unlimited invites.'); ?>
<? display_perm('site_moderate_requests', 'Can moderate any request.'); ?>
<? display_perm('site_delete_artist', 'Can delete artists (must be able to delete torrents+requests).'); ?>
<? display_perm('forums_polls_create','Can create polls in the forums.') ?>
<? display_perm('forums_polls_moderate','Can feature and close polls.') ?>
<? display_perm('site_moderate_forums', 'Can moderate the forums.'); ?>
<? display_perm('site_admin_forums', 'Can administrate the forums.'); ?>
<? display_perm('site_view_flow', 'Can view site stats and data pools.'); ?>
@ -208,9 +211,7 @@ function permissions_form(){ ?>
</tr>
<tr>
<td>
<? display_perm('forums_polls_create','Can create polls in the forums.') ?>
<? display_perm('forums_polls_moderate','Can feature and close polls.') ?>
<? display_perm('torrents_edit', 'Can edit any torrent'); ?>
<? display_perm('torrents_delete', 'Can delete torrents'); ?>
@ -222,6 +223,7 @@ function permissions_form(){ ?>
<? display_perm('torrents_edit_vanityhouse', 'Can mark groups as part of Vanity House.'); ?>
<? display_perm('artist_edit_vanityhouse', 'Can mark Artists as part of Vanity House.'); ?>
<? display_perm('site_add_logs', 'Can add logs to torrents after upload'); ?>
<? display_perm('torrents_hide_dnu', 'Hide the Do Not Upload list by default.'); ?>
</td>
</tr>
</table>

View File

@ -1854,7 +1854,7 @@ function disable_users($UserIDs, $AdminComment, $BanReason = 1) {
i.AdminComment = CONCAT('".sqltime()." - ".($AdminComment ? $AdminComment : 'Disabled by system')."\n\n', i.AdminComment),
i.BanDate='".sqltime()."',
i.BanReason='".$BanReason."',
i.RatioWatchDownload=m.Downloaded
i.RatioWatchDownload=".($BanReason == 2?'m.Downloaded':"'0'")."
WHERE m.ID IN(".implode(',',$UserIDs).") ");
$Cache->decrement('stats_user_count',$DB->affected_rows());
foreach($UserIDs as $UserID) {

File diff suppressed because one or more lines are too long

View File

@ -176,7 +176,9 @@ function compare($X, $Y){
$NumSnatches = 0;
$OpenTable = false;
$ShowGroups = !(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1);
$ShowGroups = !isset($LoggedUser['TorrentGrouping']) || $LoggedUser['TorrentGrouping'] == 0;
$HideTorrents = ($ShowGroups ? '' : ' hidden');
foreach ($TorrentList as $GroupID=>$Group) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Group);
$GroupVanityHouse = $Importances[$GroupID]['VanityHouse'];
@ -192,15 +194,15 @@ function compare($X, $Y){
} else {
$Tags[$Tag]['count']++;
}
$TorrentTags[]='<a href="torrents.php?taglist='.$Tag.'">'.$Tag.'</a>';
$TorrentTags[] = '<a href="torrents.php?taglist='.$Tag.'">'.$Tag.'</a>';
}
$TorrentTags = implode(', ', $TorrentTags);
$TorrentTags='<br /><div class="tags">'.$TorrentTags.'</div>';
$TorrentTags = '<br /><div class="tags">'.$TorrentTags.'</div>';
if (!empty($LoggedUser['DiscogView']) || (isset($LoggedUser['HideTypes']) && in_array($ReleaseType, $LoggedUser['HideTypes']))) {
$HideDiscog=" hidden";
} else {
$HideDiscog="";
$HideDiscog = ' hidden';
} else {
$HideDiscog = '';
}
@ -224,7 +226,7 @@ function compare($X, $Y){
<table class="torrent_table" id="torrents_<?=$ReleaseTypeLabel?>">
<tr class="colhead_dark">
<td class="small"><!-- expand/collapse --></td>
<td width="70%"><a href="#">&uarr;</a>&nbsp;<strong><?=$DisplayName?></strong> (<a href="#" onclick="$('.releases_<?=$ReleaseType?>').toggle();return false;">View</a>)</td>
<td width="70%"><a href="#">&uarr;</a>&nbsp;<strong><?=$DisplayName?></strong> (<a href="#" onclick="$('.releases_<?=$ReleaseType?>').toggle(true);return false;">View</a>)</td>
<td>Size</td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/snatched.png" alt="Snatches" title="Snatches" /></td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/seeders.png" alt="Seeders" title="Seeders" /></td>
@ -300,7 +302,7 @@ function compare($X, $Y){
$RemasterName .= $AddExtra.display_str($Torrent['Media']);
?>
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition group_torrent discog <?=$HideDiscog?>">
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition group_torrent discog<?=$HideDiscog.$HideTorrents?>">
<td colspan="6" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" title="Collapse this edition">&minus;</a> <?=$RemasterName?></strong></a></td>
</tr>
<?
@ -315,7 +317,7 @@ function compare($X, $Y){
}
$MasterName .= $AddExtra.display_str($Torrent['Media']);
?>
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition group_torrent <?=$HideDiscog?>">
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition group_torrent<?=$HideDiscog.$HideTorrents?>">
<td colspan="6" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" title="Collapse this edition">&minus;</a> <?=$MasterName?></strong></a></td>
</tr>
<?
@ -327,7 +329,7 @@ function compare($X, $Y){
$LastRemasterCatalogueNumber = $Torrent['RemasterCatalogueNumber'];
$LastMedia = $Torrent['Media'];
?>
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition_<?=$EditionID?> group_torrent discog <?=$HideDiscog?>">
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition_<?=$EditionID?> group_torrent discog<?=$HideDiscog.$HideTorrents?>">
<td colspan="2">
<span>
[<a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download"><?=$Torrent['HasFile'] ? 'DL' : 'Missing'?></a>]

View File

@ -165,10 +165,8 @@ function compare($X, $Y){
if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) {
$EditionID++;
if($Torrent['Remastered'] && $Torrent['RemasterYear'] != 0) {
$EditionID++;
$RemasterName = $Torrent['RemasterYear'];
$AddExtra = " - ";
if($Torrent['RemasterRecordLabel']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterRecordLabel']); $AddExtra=' / '; }

View File

@ -81,9 +81,13 @@
$Cache->cache_value('genre_tags', $GenreTags, 3600*6);
}
?>
<div style="margin:0px auto;width:700px">
<div class="<?=(check_perms('torrents_hide_dnu')?'box pad':'')?>" style="margin:0px auto;width:700px">
<h3 id="dnu_header">Do not upload</h3>
<p>The following releases are currently forbidden from being uploaded from the site. Do not upload them unless your torrent meets a condition specified in the comment.</p>
<p>The following releases are currently forbidden from being uploaded from the site. Do not upload them unless your torrent meets a condition specified in the comment.
<? if (check_perms('torrents_hide_dnu')) { ?>
<span id="showdnu"><a href="#" <a href="#" onclick="$('#dnulist').toggle(); this.innerHTML=(this.innerHTML=='(Hide)'?'(Show)':'(Hide)'); return false;">(Show)</a></span>
<? } ?>
</p>
<?
$DB->query("SELECT
d.Name,
@ -91,7 +95,7 @@
FROM do_not_upload as d
ORDER BY d.Time");
?>
<table style="">
<table id="dnulist" class="<?=(check_perms('torrents_hide_dnu')?'hidden':'')?>" style="">
<tr class="colhead">
<td width="50%"><strong>Name</strong></td>
<td><strong>Comment</strong></td>
@ -103,7 +107,7 @@
</tr>
<? } ?>
</table>
</div>
</div><?=(check_perms('torrents_hide_dnu')?'<br />':'')?>
<?
$TorrentForm->head();
switch ($UploadForm) {

View File

@ -502,6 +502,7 @@
$CanLeech = 1;
$UpdateSet[]="m.can_leech='1'";
$UpdateSet[]="i.RatioWatchDownload='0'";
update_tracker('add_user', array('id' => $UserID, 'passkey' => $Cur['torrent_pass']));
} else {
$EnableStr .= ' (Ratio: '.number_format($Cur['Uploaded']/$Cur['Downloaded'],2).', RR: '.number_format($Cur['RequiredRatio'],2).')';
if ($Cur['RatioWatchEnds'] != '0000-00-00 00:00:00') {
@ -510,7 +511,6 @@
}
$UpdateSet[]="Enabled='1'";
$LightUpdates['Enabled'] = 1;
update_tracker('add_user', array('id' => $UserID, 'passkey' => $Cur['torrent_pass']));
}
$EditSummary[]=$EnableStr;
$Cache->replace_value('enabled_'.$UserID, $EnableUser, 0);

View File

@ -176,13 +176,13 @@ util.fn = util.prototype = {
show: function () {
return this.remove_class('hidden');
},
hide: function () {
return this.add_class('hidden');
hide: function (force) {
return this.add_class('hidden', force);
},
toggle: function () {
toggle: function (force) {
//Should we interate and invert all entries, or just go by the first?
if (!in_array('hidden', this.objects[0].className.split(' '))) {
this.add_class('hidden');
this.add_class('hidden', force);
} else {
this.remove_class('hidden');
}
@ -206,12 +206,12 @@ util.fn = util.prototype = {
}
return this;
},
add_class: function (class_name) {
add_class: function (class_name, force) {
for (var i=0,il=this.objects.length;i<il;i++) {
var object = this.objects[i];
if (object.className === '') {
object.className = class_name;
} else if (!in_array(class_name, object.className.split(' '))) {
} else if (force || !in_array(class_name, object.className.split(' '))) {
object.className = object.className + ' ' + class_name;
}
}
@ -221,12 +221,11 @@ util.fn = util.prototype = {
for (var i=0,il=this.objects.length;i<il;i++) {
var object = this.objects[i];
var classes = object.className.split(' ');
var result = array_search(class_name, classes)
if (result === false) {
//return this;
var result = array_search(class_name, classes);
if (result !== false) {
classes.splice(result,1);
object.className = classes.join(' ');
}
delete classes[result];
object.className = classes.join(' ');
}
return this;
},