diff --git a/classes/invite_tree.class.php b/classes/invite_tree.class.php
index 69f1bd8e..74fdf3f9 100644
--- a/classes/invite_tree.class.php
+++ b/classes/invite_tree.class.php
@@ -91,7 +91,7 @@ function make_tree() {
// We store this in an output buffer, so we can show the summary at the top without having to loop through twice
ob_start();
- while (list($ID, $Enabled, $Class, $Donor, $Uploaded, $Downloaded, $Paranoia, $TreePosition, $TreeLevel) = G::$DB->next_record()) {
+ while (list($ID, $Enabled, $Class, $Donor, $Uploaded, $Downloaded, $Paranoia, $TreePosition, $TreeLevel) = G::$DB->next_record(MYSQLI_NUM, false)) {
// Do stats
$Count++;
@@ -127,6 +127,7 @@ function make_tree() {
} else {
echo "\t\n
";
}
+ $UserClass = $Classes[$Class]['Level'];
?>
=Users::format_username($ID, true, true, ($Enabled != 2 ? false : true), true)?>
@@ -141,7 +142,7 @@ function make_tree() {
} else {
$ParanoidCount++;
?>
- Paranoia: =number_format($Paranoia) ?>
+ Hidden
}
?>
diff --git a/classes/lastfm.class.php b/classes/lastfm.class.php
index 40e67cf7..cada436c 100644
--- a/classes/lastfm.class.php
+++ b/classes/lastfm.class.php
@@ -125,11 +125,11 @@ public static function get_hyped_artists($Limit = 100) {
- public static function clear_cache($Username, $Uid) {
- $Response = G::$Cache->get_value('lastfm_clear_cache_' . G::$LoggedUser['ID'] . '_' . $_GET['id']);
+ public static function clear_cache($Username, $UserID) {
+ $Response = G::$Cache->get_value("lastfm_clear_cache_$UserID");
if (empty($Response)) {
// Prevent clearing the cache on the same uid page for the next 10 minutes.
- $Response = G::$Cache->cache_value('lastfm_clear_cache_' . G::$LoggedUser['ID'] . "_$Uid", $Username, 600);
+ G::$Cache->cache_value("lastfm_clear_cache_$UserID", 1, 600);
G::$Cache->delete_value("lastfm_user_info_$Username");
G::$Cache->delete_value("lastfm_last_played_track_$Username");
G::$Cache->delete_value("lastfm_top_artists_$Username");
@@ -139,7 +139,7 @@ public static function clear_cache($Username, $Uid) {
G::$DB->query("
SELECT username
FROM lastfm_users
- WHERE ID = '" . G::$LoggedUser['ID'] . "'");
+ WHERE ID = " . G::$LoggedUser['ID']);
if (G::$DB->has_results()) {
list($Username2) = G::$DB->next_record();
//Make sure the usernames are in the correct order to avoid dupe cache keys.
@@ -148,7 +148,7 @@ public static function clear_cache($Username, $Uid) {
$Username = $Username2;
$Username2 = $Temp;
}
- G::$Cache->delete_value("lastfm_compare_$Username" . "_$Username2");
+ G::$Cache->delete_value("lastfm_compare_{$Username}_$Username2");
}
G::$DB->set_query_id($QueryID);
}
diff --git a/gazelle.sql b/gazelle.sql
index b50979fc..7dfac178 100644
--- a/gazelle.sql
+++ b/gazelle.sql
@@ -1439,7 +1439,10 @@ CREATE TABLE `users_donor_ranks` (
`TotalRank` int(10) NOT NULL DEFAULT '0',
`SpecialRank` tinyint(2) DEFAULT '0',
`InvitesRecievedRank` tinyint(4) DEFAULT '0',
- PRIMARY KEY (`UserID`)
+ PRIMARY KEY (`UserID`),
+ KEY `DonationTime` (`DonationTime`),
+ KEY `SpecialRank` (`SpecialRank`),
+ KEY `Rank` (`Rank`)
) ENGINE=InnoDB CHARSET utf8;
CREATE TABLE `users_downloads` (
diff --git a/sections/artist/artist.php b/sections/artist/artist.php
index ec2ecb4d..b8ba4c70 100644
--- a/sections/artist/artist.php
+++ b/sections/artist/artist.php
@@ -688,10 +688,10 @@ function compare($X, $Y) {