Empty commit

This commit is contained in:
Git 2013-01-31 08:00:19 +00:00
parent 1aa151a798
commit 16435b18f2
2 changed files with 29 additions and 23 deletions

View File

@ -1,16 +1,15 @@
<div class="box">
<div id="concerts" class="head">
<a href="#">&uarr;</a>&nbsp;<strong>Upcoming concerts</strong>
[<a href="#" onclick="$('#concertsbody').toggle(); return false;">Toggle</a>]
</div>
<div id="concertsbody">
<? <?
$Concerts = '';
ob_start();
$ArtistEvents = LastFM::get_artist_events($ArtistID, $Name); $ArtistEvents = LastFM::get_artist_events($ArtistID, $Name);
$Hidden = false;
$Debug->log_var($ArtistEvents); $Debug->log_var($ArtistEvents);
if ($ArtistEvents === false) { // Something went wrong if ($ArtistEvents === false) { // Something went wrong
echo '<br />An error occurred when retrieving concert info.<br />'; echo '<br />An error occurred when retrieving concert info.<br />';
} elseif (!isset($ArtistEvents['events']['event'])) { // No upcoming events } elseif (!isset($ArtistEvents['events']['event'])) { // No upcoming events
echo '<br />This artist has no upcoming concerts.<br />'; echo '<br />This artist has no upcoming concerts.<br />';
$Hidden = true;
} else { } else {
echo '<ul>'; echo '<ul>';
if (isset($ArtistEvents['events']['event'][0])) { // Multiple events if (isset($ArtistEvents['events']['event'][0])) { // Multiple events
@ -22,7 +21,16 @@
} }
echo '</ul>'; echo '</ul>';
} }
$Concerts .= ob_get_clean();
?> ?>
<div class="box">
<div id="concerts" class="head">
<a href="#">&uarr;</a>&nbsp;<strong>Upcoming concerts</strong>
[<a href="#" onclick="$('#concertsbody').toggle(); return false;">Toggle</a>]
</div>
<div id="concertsbody" <?=$Hidden ? "class='hidden'" : ""?>>
<?=$Concerts?>
</div> </div>
</div> </div>
@ -47,9 +55,7 @@ function make_concert_link($Event)
<li><?=$Concert?> - [<a href="#" onclick="$('#concert<?=$Event['id']?>').raw().submit(); return false;">Go to thread</a>]</li> <li><?=$Concert?> - [<a href="#" onclick="$('#concert<?=$Event['id']?>').raw().submit(); return false;">Go to thread</a>]</li>
<? <?
} }
?>
<?
function get_concert_post_template($Artist, $Event) function get_concert_post_template($Artist, $Event)
{ {
$With = ""; $With = "";

View File

@ -547,7 +547,7 @@
$UpdateSet[]="m.can_leech='1'"; $UpdateSet[]="m.can_leech='1'";
$UpdateSet[]="i.RatioWatchDownload='0'"; $UpdateSet[]="i.RatioWatchDownload='0'";
} else { } else {
$EnableStr .= ' (Ratio: '.number_format($Cur['Uploaded']/$Cur['Downloaded'],2).', RR: '.number_format($Cur['RequiredRatio'],2).')'; $EnableStr .= ' (Ratio: '.Format::get_ratio_html($Cur['Uploaded'], $Cur['Downloaded'], false).', RR: '.number_format($Cur['RequiredRatio'],2).')';
if ($Cur['RatioWatchEnds'] != '0000-00-00 00:00:00') { if ($Cur['RatioWatchEnds'] != '0000-00-00 00:00:00') {
$UpdateSet[]="i.RatioWatchEnds=NOW()"; $UpdateSet[]="i.RatioWatchEnds=NOW()";
$UpdateSet[]="i.RatioWatchDownload=m.Downloaded"; $UpdateSet[]="i.RatioWatchDownload=m.Downloaded";