Empty commit

This commit is contained in:
Git 2013-06-13 08:01:05 +00:00
parent e47d02a276
commit a2d7c73ab2
14 changed files with 62 additions and 49 deletions

View File

@ -200,6 +200,6 @@ $CaptchaBGs=array('captcha1.png','captcha2.png','captcha3.png','captcha4.png','c
// Special characters, and what they should be converted to
// Used for torrent searching
$SpecialChars = array(
'&' => 'and'
'&' => 'and'
);
?>

View File

@ -127,24 +127,24 @@ private static function has_whatimg_thumb($Url) {
* Cleans up imgur URL if it already has a modifier attached to the end of it.
*/
private static function clean_imgur_url($Url) {
$Extension = pathinfo($Url, PATHINFO_EXTENSION);
$Full = preg_replace('/\.[^.]*$/', '', $Url);
$Base = substr($Full, 0, strrpos($Full, '/'));
$Path = substr($Full, strrpos($Full, '/') + 1);
if (strlen($Path) == 6) {
$Last = $Path[strlen($Path) - 1];
if ($Last == 'm' || $Last == 'l' || $Last == 's' || $Last == 'h' || $Last == 'b') {
$Path = substr($Path, 0, -1);
}
}
return $Base . '/' . $Path . '.' . $Extension;
$Extension = pathinfo($Url, PATHINFO_EXTENSION);
$Full = preg_replace('/\.[^.]*$/', '', $Url);
$Base = substr($Full, 0, strrpos($Full, '/'));
$Path = substr($Full, strrpos($Full, '/') + 1);
if (strlen($Path) == 6) {
$Last = $Path[strlen($Path) - 1];
if ($Last == 'm' || $Last == 'l' || $Last == 's' || $Last == 'h' || $Last == 'b') {
$Path = substr($Path, 0, -1);
}
}
return "$Base/$Path.$Extension";
}
/**
* Replaces the extension.
*/
private static function replace_extension($String, $Extension) {
return preg_replace('/\.[^.]*$/', $Extension, $String);
return preg_replace('/\.[^.]*$/', $Extension, $String);
}
/**

View File

@ -35,9 +35,9 @@ function show() {
}
function get() {
$RESULT = '';
$TMPVAR = '';
for ($i = 0; $i < sizeof($this->file); $i++) {
$RESULT = '';
$TMPVAR = '';
for ($i = 0; $i < sizeof($this->file); $i++) {
$TMPVAR = $this->file[$i];
foreach ($this->vars as $k=>$v) {
if ($v[1] != '' && $v[0] == '') {

View File

@ -722,12 +722,12 @@ private function to_html ($Array) {
$this->NoImg++; // No images inside quote tags
$this->InQuotes++;
if ($this->InQuotes == $this->NestsBeforeHide) { //Put quotes that are nested beyond the specified limit in [hide] tags.
$Str.='<strong>Older quotes</strong>: <a href="javascript:void(0);" onclick="BBCode.spoiler(this);">Show</a>';
$Str.='<blockquote class="hidden spoiler">';
$Str.='<strong>Older quotes</strong>: <a href="javascript:void(0);" onclick="BBCode.spoiler(this);">Show</a>';
$Str.='<blockquote class="hidden spoiler">';
}
if (!empty($Block['Attr'])) {
$Exploded = explode('|', $this->to_html($Block['Attr']));
if (isset($Exploded[1]) && is_numeric($Exploded[1])) {
if (isset($Exploded[1]) && is_numeric($Exploded[1])) {
$PostID = trim($Exploded[1]);
$Str.='<a href="forums.php?action=viewthread&amp;postid='.$PostID.'" onclick="QuoteJump(event, '.$PostID.'); return false;"><strong class="quoteheader">'.$Exploded[0].'</strong> wrote: </a>';
}
@ -737,7 +737,7 @@ private function to_html ($Array) {
}
$Str.='<blockquote>'.$this->to_html($Block['Val']).'</blockquote>';
if ($this->InQuotes == $this->NestsBeforeHide) { //Close quote the deeply nested quote [hide].
$Str.='</blockquote><br />'; // Ensure new line after quote train hiding
$Str.='</blockquote><br />'; // Ensure new line after quote train hiding
}
$this->NoImg--;
$this->InQuotes--;

View File

@ -469,8 +469,8 @@ function show() {
} ?>
<? if ($this->NewTorrent) { ?>
<tr>
<td class="label">Multi-format uploader:</td>
<td><input type="button" value="+" id="add_format" /><input type="button" style="display: none;" value="-" id="remove_format" /></td>
<td class="label">Multi-format uploader:</td>
<td><input type="button" value="+" id="add_format" /><input type="button" style="display: none;" value="-" id="remove_format" /></td>
</tr>
<tr id="placeholder_row_top"></tr>
<tr id="placeholder_row_bottom"></tr>
@ -479,7 +479,7 @@ function show() {
<td class="label">Vanity House:</td>
<td>
<label><input type="checkbox" id="vanity_house" name="vanity_house"<? if ($Torrent['GroupID']) { echo ' disabled="disabled"'; } ?><? if ($Torrent['VanityHouse']) { echo ' checked="checked"';} ?> />
Check this only if you are submitting your own work or submitting on behalf of the artist, and this is intended to be a Vanity House release. Checking this will also automatically add the group as a recommendation.
Check this only if you are submitting your own work or submitting on behalf of the artist, and this is intended to be a Vanity House release. Checking this will also automatically add the group as a recommendation.
</label>
</td>
</tr>

View File

@ -154,6 +154,13 @@ CREATE TABLE `bookmarks_torrents` (
KEY `GroupID` (`GroupID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `changelog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`time` datetime DEFAULT NULL,
`message` text COLLATE utf8_swedish_ci,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci;
CREATE TABLE `collages` (
`ID` int(10) NOT NULL AUTO_INCREMENT,
`Name` varchar(100) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL DEFAULT '',

View File

@ -35,7 +35,8 @@
um.Username,
ui.Donor,
ui.Warned,
um.Enabled,";
um.Enabled,
ui.Avatar,";
$sql .= ($Section == 'sentbox')? ' cu.SentDate ' : ' cu.ReceivedDate ';
$sql .= "AS Date
FROM pm_conversations AS c
@ -81,7 +82,7 @@
$Pages = Format::get_pages($Page, $NumResults, MESSAGES_PER_PAGE, 9);
$JsonMessages = array();
while (list($ConvID, $Subject, $Unread, $Sticky, $ForwardedID, $ForwardedName, $SenderID, $Username, $Donor, $Warned, $Enabled, $Date) = $DB->next_record()) {
while (list($ConvID, $Subject, $Unread, $Sticky, $ForwardedID, $ForwardedName, $SenderID, $Username, $Donor, $Warned, $Enabled, $Avatar, $Date) = $DB->next_record()) {
$JsonMessage = array(
'convId' => (int) $ConvID,
'subject' => $Subject,
@ -91,6 +92,7 @@
'forwardedName' => $ForwardedName,
'senderId' => (int) $SenderID,
'username' => $Username,
'avatar' => $Avatar,
'donor' => $Donor == 1,
'warned' => $Warned == 1,
'enabled' => ($Enabled == 2 ? false : true),

View File

@ -55,9 +55,12 @@
$PMUserID = (int)$PMUserID;
$Users[$PMUserID]['UserStr'] = Users::format_username($PMUserID, true, true, true, true);
$Users[$PMUserID]['Username'] = $Username;
$UserInfo = Users::user_info($PMUserID);
$Users[$PMUserID]['Avatar'] = $UserInfo['Avatar'];
}
$Users[0]['UserStr'] = 'System'; // in case it's a message from the system
$Users[0]['Username'] = 'System';
$Users[0]['Avatar'] = '';
@ -86,6 +89,7 @@
'senderId' => (int) $SenderID,
'senderName' => $Users[(int)$SenderID]['Username'],
'sentDate' => $SentDate,
'avatar' => $Users[(int)$SenderID]['Avatar'],
'bbBody' => $Body,
'body' => $Text->full_format($Body)
);

View File

@ -510,7 +510,7 @@ function compare($X, $Y) {
<? } ?>
<a href="artist.php?action=history&amp;artistid=<?=$ArtistID?>" class="brackets">View history</a>
<a href="artist.php?id=<?=$ArtistID?>#info" class="brackets">Info</a>
<? if (defined(LASTFM_API_KEY)) { ?>
<? if (defined('LASTFM_API_KEY')) { ?>
<a href="artist.php?id=<?=$ArtistID?>#concerts" class="brackets">Concerts</a>
<? } ?>
<a href="artist.php?id=<?=$ArtistID?>#artistcomments" class="brackets">Comments</a>
@ -933,7 +933,7 @@ function require(file, callback) {
</div>
<div id="body" class="body"><?=$Text->full_format($Body)?></div>
</div>
<? if (defined(LASTFM_API_KEY)) {
<? if (defined('LASTFM_API_KEY')) {
include(SERVER_ROOT.'/sections/artist/concerts.php');
} ?>
<?php

View File

@ -84,12 +84,12 @@
while (list($SentDate, $SenderID, $Body, $MessageID) = $DB->next_record()) { ?>
<div class="box vertical_space">
<div class="head" style="overflow: hidden;">
<div style="float: left;">
<strong><?=$Users[(int)$SenderID]['UserStr']?></strong> <?=time_diff($SentDate)?> - <a href="#quickpost" onclick="Quote('<?=$MessageID?>','<?=$Users[(int)$SenderID]['Username']?>');" class="brackets">Quote</a>
</div>
<div style="float: right;"><a href="#">&uarr;</a> <a href="#messageform">&darr;</a></div>
</div>
<div class="head" style="overflow: hidden;">
<div style="float: left;">
<strong><?=$Users[(int)$SenderID]['UserStr']?></strong> <?=time_diff($SentDate)?> - <a href="#quickpost" onclick="Quote('<?=$MessageID?>','<?=$Users[(int)$SenderID]['Username']?>');" class="brackets">Quote</a>
</div>
<div style="float: right;"><a href="#">&uarr;</a> <a href="#messageform">&darr;</a></div>
</div>
<div class="body" id="message<?=$MessageID?>">
<?=$Text->full_format($Body)?>
</div>

View File

@ -15,7 +15,7 @@
<li>To maintain <strong>leeching privileges</strong>, your ratio must remain above a minimum value. This minimum value is your <strong>required ratio</strong>.</li>
<li>If your ratio falls below your required ratio, you will be given two weeks to raise your ratio back above your required ratio. During this period, you are on <strong>ratio watch</strong>.
</li>
<li>If you fail to raise your ratio above your required required ratio in the allotted time, your leeching privileges will be revoked. You will be unable to download more data. Your account will remain enabled.
<li>If you fail to raise your ratio above your required ratio in the allotted time, your leeching privileges will be revoked. You will be unable to download more data. Your account will remain enabled.
</li>
</ul>
<br />

View File

@ -216,7 +216,7 @@
$Options['DisableAutoSave'] = (!empty($_POST['disableautosave']) ? 1 : 0);
$Options['NoVoteLinks'] = (!empty($_POST['novotelinks']) ? 1 : 0);
$Options['CoverArt'] = (int) !empty($_POST['coverart']);
$Options['ShowExtraCovers'] = (int) !empty($_POST['show_extra_covers']);
$Options['ShowExtraCovers'] = (int) !empty($_POST['show_extra_covers']);
if (isset($LoggedUser['DisableFreeTorrentTop10'])) {
$Options['DisableFreeTorrentTop10'] = $LoggedUser['DisableFreeTorrentTop10'];

View File

@ -120,9 +120,9 @@ var autocomp = {
return;
}
ajax.get(this.id+'.php?action=autocomplete&name='+this.input.value,function(jstr) {
ajax.get(this.id + '.php?action=autocomplete&name=' + this.input.value, function(jstr) {
var data = json.decode(jstr);
autocomp.cache[autocomp.id+data[0]] = data;
autocomp.cache[autocomp.id + data[0]] = data;
autocomp.display(data);
});
},
@ -138,13 +138,13 @@ var autocomp = {
autocomp.highlight(this.i);
});
listener.set(li,'click',function(e) {
var location = autocomp.id + '.php?id='+this.artistid;
if (e.button == 0) {
window.open(location, '_self');
} else if (e.button == 1) {
var win = window.open(location, '_blank');
var location = autocomp.id + '.php?id=' + this.artistid;
if (e.button == 0) {
window.open(location, '_self');
} else if (e.button == 1) {
var win = window.open(location, '_blank');
win.focus();
}
}
});
this.list.appendChild(li);
}

View File

@ -119,8 +119,8 @@ function showReleaseGroups(xml) {
var $type = $(this).attr("type");
var $score = $(this).attr("ext:score");
var $releaseId = $(this).attr("id");
var $result = $artist + " - " + $title + " [Type: " + $type + ", Score: " + $score + "]"
$("<a href='#null'>" + $result + "<p />").attr("id", $releaseId).appendTo("#results1");
var $result = $artist + " - " + $title + " [Type: " + $type + ", Score: " + $score + "]"
$('<a href="#null">' + $result + "<p />").attr("id", $releaseId).appendTo("#results1");
});
}
@ -153,7 +153,7 @@ function showReleases(xml) {
});
});
});
var $result = $title + " [Year: " + $year + ", Format: " + $format + ", Tracks: " + $tracks + ", Country: " + $country + "]";
var $result = $title + " [Year: " + $year + ", Format: " + $format + ", Tracks: " + $tracks + ", Country: " + $country + "]";
$('<a href="#null">' + $result + "</a>").attr("id", $release_id).appendTo("#results2");
$('<a href="https://musicbrainz.org/release/' + $release_id +'" target="_new" class="brackets">View on MusicBrainz</a>' + "<p />").attr("id", "mb").appendTo("#results2");
@ -169,7 +169,7 @@ function showReleases(xml) {
function parseTags(xml) {
$tags = "";
$(xml).find("tag").each(function() {
$tag = cleanTag($(this).find("name").text());
$tag = cleanTag($(this).find("name").text());
if (isValidTag($tag)) {
$tags += "," + $tag;
}
@ -225,11 +225,11 @@ function populateForm(xml) {
}
var $country_text = "";
if ($country.length > 0) {
$country_text = "Country: " + $country + "\n";
$country_text = "Country: " + $country + "\n";
}
var $barcode_text = "";
if ($barcode.length > 0) {
$barcode_text = "Barcode: " + $barcode + "\n";
$barcode_text = "Barcode: " + $barcode + "\n";
}
var $description = $amazon_link +
"[url=https://musicbrainz.org/release-group/" + $release_group_id + "]MusicBrainz[/url]" + "\n" + "\n" +