From a2d7c73ab285ecb77b38134ac5f4895fe7c7aad1 Mon Sep 17 00:00:00 2001 From: Git Date: Thu, 13 Jun 2013 08:01:05 +0000 Subject: [PATCH] Empty commit --- classes/config.template | 2 +- classes/image_tools.class.php | 24 ++++++++++++------------ classes/templates.class.php | 6 +++--- classes/text.class.php | 8 ++++---- classes/torrent_form.class.php | 6 +++--- gazelle.sql | 7 +++++++ sections/ajax/inbox/inbox.php | 6 ++++-- sections/ajax/inbox/viewconv.php | 4 ++++ sections/artist/artist.php | 4 ++-- sections/inbox/conversation.php | 12 ++++++------ sections/rules/ratio.php | 2 +- sections/user/takeedit.php | 2 +- static/functions/autocomplete.js | 16 ++++++++-------- static/functions/musicbrainz.js | 12 ++++++------ 14 files changed, 62 insertions(+), 49 deletions(-) diff --git a/classes/config.template b/classes/config.template index 8d22861e..58792864 100644 --- a/classes/config.template +++ b/classes/config.template @@ -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' ); ?> diff --git a/classes/image_tools.class.php b/classes/image_tools.class.php index b42a2fc3..629546b6 100644 --- a/classes/image_tools.class.php +++ b/classes/image_tools.class.php @@ -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); } /** diff --git a/classes/templates.class.php b/classes/templates.class.php index 1d018faf..1c9f5f50 100644 --- a/classes/templates.class.php +++ b/classes/templates.class.php @@ -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] == '') { diff --git a/classes/text.class.php b/classes/text.class.php index 43fac825..a385af0f 100644 --- a/classes/text.class.php +++ b/classes/text.class.php @@ -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.='Older quotes: Show'; - $Str.='
'; // Ensure new line after quote train hiding } $this->NoImg--; $this->InQuotes--; diff --git a/classes/torrent_form.class.php b/classes/torrent_form.class.php index f9abcfd7..ff21e839 100644 --- a/classes/torrent_form.class.php +++ b/classes/torrent_form.class.php @@ -469,8 +469,8 @@ function show() { } ?> NewTorrent) { ?> - Multi-format uploader: - + Multi-format uploader: + @@ -479,7 +479,7 @@ function show() { Vanity House: diff --git a/gazelle.sql b/gazelle.sql index 5a90926f..65f5210d 100644 --- a/gazelle.sql +++ b/gazelle.sql @@ -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 '', diff --git a/sections/ajax/inbox/inbox.php b/sections/ajax/inbox/inbox.php index a8e8b03a..476c4d61 100644 --- a/sections/ajax/inbox/inbox.php +++ b/sections/ajax/inbox/inbox.php @@ -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), diff --git a/sections/ajax/inbox/viewconv.php b/sections/ajax/inbox/viewconv.php index 13c206f9..aaa3073f 100644 --- a/sections/ajax/inbox/viewconv.php +++ b/sections/ajax/inbox/viewconv.php @@ -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) ); diff --git a/sections/artist/artist.php b/sections/artist/artist.php index 4896559d..3cab8123 100644 --- a/sections/artist/artist.php +++ b/sections/artist/artist.php @@ -510,7 +510,7 @@ function compare($X, $Y) { View history Info - + Concerts Comments @@ -933,7 +933,7 @@ function require(file, callback) {
full_format($Body)?>
- next_record()) { ?>
-
-
- - Quote -
-
-
+
+
+ - Quote +
+
+
full_format($Body)?>
diff --git a/sections/rules/ratio.php b/sections/rules/ratio.php index 5527fa35..e3a28872 100644 --- a/sections/rules/ratio.php +++ b/sections/rules/ratio.php @@ -15,7 +15,7 @@
  • To maintain leeching privileges, your ratio must remain above a minimum value. This minimum value is your required ratio.
  • 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 ratio watch.
  • -
  • 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. +
  • 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.

  • diff --git a/sections/user/takeedit.php b/sections/user/takeedit.php index fa822ced..ee004f39 100644 --- a/sections/user/takeedit.php +++ b/sections/user/takeedit.php @@ -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']; diff --git a/static/functions/autocomplete.js b/static/functions/autocomplete.js index b70d820f..86de92ab 100644 --- a/static/functions/autocomplete.js +++ b/static/functions/autocomplete.js @@ -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); } diff --git a/static/functions/musicbrainz.js b/static/functions/musicbrainz.js index e91b70ae..13ff49b0 100644 --- a/static/functions/musicbrainz.js +++ b/static/functions/musicbrainz.js @@ -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 + "]" - $("" + $result + "

    ").attr("id", $releaseId).appendTo("#results1"); + var $result = $artist + " - " + $title + " [Type: " + $type + ", Score: " + $score + "]" + $('' + $result + "

    ").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 + "]"; $('' + $result + "").attr("id", $release_id).appendTo("#results2"); $('View on MusicBrainz' + "

    ").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" +