Empty commit

This commit is contained in:
Git 2013-02-13 08:00:35 +00:00
parent ba19d68c78
commit 39b774233f
12 changed files with 96 additions and 70 deletions

View File

@ -64,7 +64,7 @@ function update_tracker($Action, $Updates, $ToIRC = false) {
send_irc("PRIVMSG #tracker :{$Attempts} {$Err} {$Get}");
if ($Cache->get_value('ocelot_error_reported') === false) {
send_irc("PRIVMSG ".ADMIN_CHAN." :Failed to update ocelot: ".$Err." : ".$Get);
$Cache->cache_value('ocelot_error_reported', true, 900);
$Cache->cache_value('ocelot_error_reported', true, 3600);
}
}
return ($Return == "success");

View File

@ -1,25 +1,25 @@
<?
function print_compose_staff_pm($Hidden = true) { ?>
<div id="compose" class="<?=($Hidden ? 'hidden' : '')?>">
<form class="send_form" name="staff_message" action="staffpm.php" method="post">
<input type="hidden" name="action" value="takepost" />
<h3><label for="subject">Subject</label></h3>
<input size="95" type="text" name="subject" id="subject" />
<br />
<h3><label for="message">Message</label></h3>
<textarea rows="10" cols="95" name="message" id="message"></textarea>
<br />
<strong>Send to: </strong>
<select name="level">
<option value="0" selected="selected">First Line Support</option>
<option value="650">Forum Moderators</option>
<option value="700">Staff</option>
</select>
<input type="submit" value="Send message" />
<input type="button" value="Hide" onclick="$('#compose').toggle();return false;" />
</form>
</div>
<? } ?>
<div id="compose" class="<?=($Hidden ? 'hidden' : '')?>">
<form class="send_form" name="staff_message" action="staffpm.php" method="post">
<input type="hidden" name="action" value="takepost" />
<h3><label for="subject">Subject</label></h3>
<input size="95" type="text" name="subject" id="subject" />
<br />
<h3><label for="message">Message</label></h3>
<?
$TextPrev = new TEXTAREA_PREVIEW('message', 'message', '', 95, 10, true, false);
?>
<br />
<strong>Send to: </strong>
<select name="level">
<option value="0" selected="selected">First Line Support</option>
<option value="650">Forum Moderators</option>
<option value="700">Staff</option>
</select>
<input type="button" value="Preview" class="hidden button_preview_<?=$TextPrev->getID()?>" title="Preview text" />
<input type="submit" value="Send message" />
<input type="button" value="Hide" onclick="$('#compose').toggle();return false;" />
</form>
</div>

View File

@ -38,7 +38,7 @@
$DisplayName.='<a href="torrents.php?id='.$GroupID.'&amp;torrentid='.$FlacID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
if($ReleaseType>0) { $DisplayName.=" [".$ReleaseTypes[$ReleaseType]."]"; }
$ExtraInfo = Torrents::torrent_info($Torrents[$FlacID]);
if($ExtraInfo) {
$DisplayName.=' - '.$ExtraInfo;
@ -56,10 +56,10 @@
$TorrentTags='<br /><div class="tags">'.$TagList.'</div>';
}
?>
<tr class="torrent torrent_row<?=$Torrents[$FlacID]['IsSnatched'] ? ' snatched_torrent"' : ''?>">
<tr class="torrent torrent_row<?=$Torrents[$FlacID]['IsSnatched'] ? ' snatched_torrent' : ''?>">
<td>
<span class="torrent_links_block">
[ <a href="torrents.php?action=download&amp;id=<?=$FlacID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a> ]
<a href="torrents.php?action=download&amp;id=<?=$FlacID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" class="brackets">DL</a>
</span>
<?=$DisplayName?>
<?=$TorrentTags?>

View File

@ -22,7 +22,7 @@
$DB->query("SELECT t.GroupID, x.fid
FROM ".($SeedingOnly ? 'xbt_files_users' : 'xbt_snatched')." AS x
JOIN torrents AS t ON t.ID=x.fid
WHERE t.Format='FLAC'
WHERE t.Format='FLAC'
AND ((t.LogScore = '100' AND t.Media = 'CD')
OR t.Media = 'Vinyl')
AND x.uid='$UserID'");
@ -51,8 +51,8 @@
//$DB->query('SELECT * FROM t');
$DB->query("SELECT GroupID FROM temp_sections_better_snatch
WHERE EncodingList NOT LIKE '%V0 (VBR)%'
OR EncodingList NOT LIKE '%V2 (VBR)%'
WHERE EncodingList NOT LIKE '%V0 (VBR)%'
OR EncodingList NOT LIKE '%V2 (VBR)%'
OR EncodingList NOT LIKE '%320%'");
$GroupIDs = array_fill_keys($DB->collect('GroupID'), true);
@ -109,9 +109,9 @@
?>
<div class="linkbox">
<? if ($SeedingOnly) { ?>
<a href="better.php?method=snatch">Show all</a>
<a href="better.php?method=snatch" class="brackets">Show all</a>
<? } else { ?>
<a href="better.php?method=snatch&amp;filter=seeding">Just those currently seeding</a>
<a href="better.php?method=snatch&amp;filter=seeding" class="brackets">Just those currently seeding</a>
<? } ?>
</div>
<div class="thin">
@ -183,7 +183,7 @@
<tr class="torrent torrent_row<?=$Edition['IsSnatched'] ? ' snatched_torrent' : ''?>">
<td>
<span class="torrent_links_block">
[ <a href="torrents.php?action=download&amp;id=<?=$Edition['FlacID']?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">DL</a> ]
<a href="torrents.php?action=download&amp;id=<?=$Edition['FlacID']?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download" class="brackets">DL</a>
</span>
<?=$DisplayName?>
<div class="torrent_info"><?=$ExtraInfo?></div>

View File

@ -173,15 +173,15 @@
<tr<?=$Edition['IsSnatched'] ? ' class="snatched_torrent"' : ''?>>
<td>
<span class="torrent_links_block">
[ <a href="torrents.php?action=download&amp;id=<?=$Edition['FlacID']?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">DL</a> ]
<a href="torrents.php?action=download&amp;id=<?=$Edition['FlacID']?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download" class="brackets">DL</a>
</span>
<?=$DisplayName?>
<div class="torrent_info"><?=$ExtraInfo?></div>
<div class="tags"><?=$TorrentTags?></div>
</td>
<td><strong><?=isset($Edition['Formats']['V2 (VBR)'])?'<span class="important_text_alt">YES</span>':'<span class="important_text">NO</span>'?></strong></td>
<td><strong><?=isset($Edition['Formats']['V0 (VBR)'])?'<span class="important_text_alt">YES</span>':'<span class="important_text">NO</span>'?></strong></td>
<td><strong><?=isset($Edition['Formats']['320'])?'<span class="important_text_alt">YES</span>':'<span class="important_text">NO</span>'?></strong></td>
<td><?=isset($Edition['Formats']['V2 (VBR)']) ? '<strong class="important_text_alt">YES</strong>' : '<strong class="important_text">NO</strong>'?></td>
<td><?=isset($Edition['Formats']['V0 (VBR)']) ? '<strong class="important_text_alt">YES</strong>' : '<strong class="important_text">NO</strong>'?></td>
<td><?=isset($Edition['Formats']['320']) ? '<strong class="important_text_alt">YES</strong>' : '<strong class="important_text">NO</strong>'?></td>
</tr>
<?
}

View File

@ -13,8 +13,8 @@
$DB->query("SELECT t.GroupID, t.ID
FROM torrents AS t
WHERE
t.Format='FLAC'
WHERE
t.Format='FLAC'
AND ((t.LogScore = '100' AND t.Media = 'CD')
OR t.Media = 'Vinyl')
AND t.UserID='$UserID'");
@ -35,8 +35,8 @@
//$DB->query('SELECT * FROM t');
$DB->query("SELECT GroupID FROM temp_sections_better_upload
WHERE EncodingList NOT LIKE '%V0 (VBR)%'
OR EncodingList NOT LIKE '%V2 (VBR)%'
WHERE EncodingList NOT LIKE '%V0 (VBR)%'
OR EncodingList NOT LIKE '%V2 (VBR)%'
OR EncodingList NOT LIKE '%320%'");
$GroupIDs = $DB->collect('GroupID');
@ -67,7 +67,7 @@
$DisplayName = '';
}
$FlacID = $Uploads[$GroupID]['ID'];
$DisplayName = '';
if(count($Artists)>0) {
$DisplayName = Artists::display_artists(array('1'=>$Artists));
@ -80,15 +80,15 @@
if($ExtraInfo) {
$DisplayName.=' - '.$ExtraInfo;
}
$MissingEncodings = array('V0 (VBR)'=>1, 'V2 (VBR)'=>1, '320'=>1);
foreach($Torrents as $Torrent) {
if(!empty($MissingEncodings[$Torrent['Encoding']])) {
$MissingEncodings[$Torrent['Encoding']] = 0;
}
}
$TagList=array();
if($TorrentTags!='') {
$TorrentTags=explode(' ',$TorrentTags);
@ -104,14 +104,14 @@
<tr<?=$Torrents[$FlacID]['IsSnatched'] ? ' class="snatched_torrent"' : ''?>>
<td>
<span class="torrent_links_block">
[ <a href="torrents.php?action=download&amp;id=<?=$FlacID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a> ]
<a href="torrents.php?action=download&amp;id=<?=$FlacID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" class="brackets">DL</a>
</span>
<?=$DisplayName?>
<?=$DisplayName?>
<?=$TorrentTags?>
</td>
<td><strong><?=($MissingEncodings['V2 (VBR)'] == 0)?'<span style="color: green;">YES</span>':'<span style="color: red;">NO</span>'?></strong></td>
<td><strong><?=($MissingEncodings['V0 (VBR)'] == 0)?'<span style="color: green;">YES</span>':'<span style="color: red;">NO</span>'?></strong></td>
<td><strong><?=($MissingEncodings['320'] == 0)?'<span style="color: green;">YES</span>':'<span style="color: red;">NO</span>'?></strong></td>
<td><?=($MissingEncodings['V2 (VBR)'] == 0) ? '<strong class="important_text_alt">YES</strong>' : '<strong class="important_text">NO</strong>'?></td>
<td><?=($MissingEncodings['V0 (VBR)'] == 0) ? '<strong class="important_text_alt">YES</strong>' : '<strong class="important_text">NO</strong>'?></td>
<td><?=($MissingEncodings['320'] == 0) ? '<strong class="important_text_alt">YES</strong>' : '<strong class="important_text">NO</strong>'?></td>
</tr>
<? } ?>
</table>

View File

@ -108,8 +108,28 @@
'delete' => '1',
'pm' => '[url=http://'.NONSSL_SITE_URL.'/rules.php?p=upload#h2.2]2.2[/url]. Your torrent was reported because it was trumped by another torrent.'
)
),
'private_trump' => array(
'priority' => 21,
'reason' => '1',
'title' => 'Private Flag Trump',
'report_messages' => array(
'Please make sure you are reporting the torrent <strong class="important_text">which has been trumped</strong> and should be deleted, not the torrent that you think should remain on site.'
),
'report_fields' => array(
'sitelink' => '1'
),
'resolve_options' => array(
'upload' => '0',
'warn' => '0',
'delete' => '1',
'pm' => ''
)
)
),
'1' => array( //Music Resolves
'tag_trump' => array (
'priority' => '50',

View File

@ -1,9 +1,9 @@
<?
enforce_login();
View::show_header('Staff');
View::show_header('Staff', 'jquery');
include(SERVER_ROOT.'/sections/staff/functions.php');
include(SERVER_ROOT.'/sections/staffpm/functions.php');
$SupportStaff = get_support();
list($FrontLineSupport, $ForumStaff, $Staff) = $SupportStaff;
@ -20,7 +20,7 @@
<p>If you are looking for help with a general question, we appreciate it if you would only message through the staff inbox, where we can all help you.</p>
<p>You can do that by <strong><a href="#" onclick="$('#compose').toggle();">sending a message to the Staff Inbox</a></strong>.</p>
</div>
<? print_compose_staff_pm(true); ?>
<? View::parse('generic/reply/staffpm.php', array('Hidden' => true)); ?>
<br />
<h3>First-line Support</h3>
<p><strong>These users are not official staff members</strong> - they're users who have volunteered their time to help people in need. Please treat them with respect and read <a href="wiki.php?action=article&amp;id=260">this</a> before contacting them.</p>

View File

@ -2,7 +2,7 @@
include(SERVER_ROOT.'/sections/staffpm/functions.php');
View::show_header('Staff PMs', 'staffpm');
View::show_header('Staff PMs', 'staffpm,jquery');
// Get messages
$StaffPMs = $DB->query("
@ -31,7 +31,7 @@
</div>
<br />
<br />
<? print_compose_staff_pm(true); ?>
<? View::parse('generic/reply/staffpm.php', array('Hidden' => true)); ?>
<div class="box pad" id="inbox">
<?

View File

@ -20,7 +20,7 @@
$Cache->delete_value('staff_pm_new_'.$LoggedUser['ID']);
}
View::show_header('Staff PM', 'staffpm,bbcode');
View::show_header('Staff PM', 'staffpm,bbcode,jquery');
$UserInfo = Users::user_info($UserID);
$UserStr = Users::format_username($UserID, true, true, true, true);
@ -132,12 +132,14 @@
?>
<h3>Reply</h3>
<div class="box pad">
<div id="preview" class="hidden"></div>
<div id="buttons" class="center">
<form class="manage_form" name="staff_messages" action="staffpm.php" method="post" id="messageform">
<input type="hidden" name="action" value="takepost" />
<input type="hidden" name="convid" value="<?=$ConvID?>" id="convid" />
<textarea id="quickpost" name="message" cols="90" rows="10"></textarea> <br />
<?
$TextPrev = new TEXTAREA_PREVIEW('message', 'quickpost', '', 90, 10, true, false);
?>
<br />
<?
// Assign to
if ($IsStaff) {
@ -208,8 +210,8 @@
<input type="button" value="Resolve" onclick="location.href='staffpm.php?action=resolve&amp;id=<?=$ConvID?>';" />
<? if ($IsFLS) { //Moved by request ?>
<input type="button" value="Common answers" onclick="$('#common_answers').toggle();" />
<input type="button" id="previewbtn" value="Preview" onclick="PreviewMessage();" />
<? } ?>
<input type="button" id="previewbtn" value="Preview" class="hidden button_preview_<?=$TextPrev->getID()?>" title="Preview text" />
<input type="submit" value="Send message" />
<? } else { ?>
<input type="button" value="Unresolve" onclick="location.href='staffpm.php?action=unresolve&amp;id=<?=$ConvID?>';" />

View File

@ -85,7 +85,7 @@
getTopTracks(div);
});
});
// Allow updating the sidebar element contents as get requests are completed.
function updateDivContents(div) {
var html = "";
@ -110,18 +110,18 @@
$('#lastfm_loading').remove();
}
}
// Escape ampersands with url code to avoid breaking the search links
function escapeAmpUrl(input){
return input.replace(/&/g,"%26");
}
// Escape ampersands with html code to avoid breaking the search links
function escapeHtml(input){
return input.replace(/&/g,"&#38;").replace(/</g,"&#60;");
}
// Functions for fetching the required data are as follows.
// Also gets the data for shared artists as they're bundled.
function getTasteometer(div) {
@ -197,7 +197,7 @@
});
}
}
function getLastPlayedTrack(div) {
$.get('user.php?action=lastfm_last_played_track&username=' + username, function (response) {
var html = "";
@ -225,7 +225,7 @@
updateDivContents(div);
});
}
function getTopArtists(div) {
$.get('user.php?action=lastfm_top_artists&username=' + username, function (response) {
var html;
@ -299,7 +299,7 @@
for (i = 3; i < j.length; i++) {
html += '<li class="hidden"><a href="artist.php?artistname=' + escapeAmpUrl(j[i]['artist']['name']) + '">' + escapeHtml(j[i]['artist']['name']) + '</a> - <a href="torrents.php?searchstr=' + escapeAmpUrl(j[i]['name']) + '">' + escapeHtml(j[i]['name']) + '</a></li>'
}
html+= '<li>[<a href="#topalbums" id="lastfm_expand" onclick="return false">Expand</a>]</li>'
html+= '<li><a href="#topalbums" id="lastfm_expand" onclick="return false" class="brackets">Expand</a></li>'
}
html += '</ul>';
html += "</li>";
@ -311,7 +311,7 @@
updateDivContents(div);
});
}
function getTopTracks(div) {
$.get('user.php?action=lastfm_top_tracks&username=' + username, function (response) {
var html;
@ -342,7 +342,7 @@
for (i = 3; i < j.length; i++) {
html += '<li class="hidden"><a href="artist.php?artistname=' + escapeAmpUrl(j[i]['artist']['name']) + '">' + escapeHtml(j[i]['artist']['name']) + '</a> - <a href="torrents.php?artistname=' + escapeAmpUrl(j[i]['artist']['name']) + '&filelist=' + escapeAmpUrl(j[i]['name']) + '">' + escapeHtml(j[i]['name']) + '</a></li>'
}
html+= '<li>[<a href="#toptracks" id="lastfm_expand" onclick="return false">Expand</a>]</li>'
html+= '<li><a href="#toptracks" id="lastfm_expand" onclick="return false" class="brackets">Expand</a></li>'
}
html += '</ul>';
html += "</li>";

View File

@ -368,6 +368,10 @@ tr.torrent .bookmark>a:after {
font-size: inherit;
}
.preview_wrap {
text-align: left;
}
.text_preview {
min-height: 100px
}