From fbb35377a217f8c022b13c982c7a8308df05fa8c Mon Sep 17 00:00:00 2001 From: Git Date: Sun, 20 Oct 2013 08:00:53 +0000 Subject: [PATCH] Empty commit --- classes/top10view.class.php | 38 +++++++++++++++---------- sections/login/login.php | 5 ++-- sections/questions/ajax_get_answers.php | 2 +- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/classes/top10view.class.php b/classes/top10view.class.php index d13ea961..be49a963 100644 --- a/classes/top10view.class.php +++ b/classes/top10view.class.php @@ -43,14 +43,16 @@ private static function get_selected_link($String, $Selected) { } public static function render_artist_tile($Artist, $Category) { - switch ($Category) { + if (self::is_valid_artist($Artist)) { + switch ($Category) { - case 'weekly': - case 'hyped': - self::render_tile("artist.php?artistname=", $Artist['name'], $Artist['image'][3]['#text']); - break; - default: - break; + case 'weekly': + case 'hyped': + self::render_tile("artist.php?artistname=", $Artist['name'], $Artist['image'][3]['#text']); + break; + default: + break; + } } } @@ -69,14 +71,16 @@ private static function render_tile($Url, $Name, $Image) { public static function render_artist_list($Artist, $Category) { - switch ($Category) { - - case 'weekly': - case 'hyped': - self::render_list("artist.php?artistname=", $Artist['name'], $Artist['image'][3]['#text']); - break; - default: - break; + if (self::is_valid_artist($Artist)) { + switch ($Category) { + + case 'weekly': + case 'hyped': + self::render_list("artist.php?artistname=", $Artist['name'], $Artist['image'][3]['#text']); + break; + default: + break; + } } } @@ -94,4 +98,8 @@ private static function render_list($Url, $Name, $Image) { } } + private static function is_valid_artist($Artist) { + return $Artist['name'] != '[unknown]'; + } + } diff --git a/sections/login/login.php b/sections/login/login.php index 98c37a02..27550764 100644 --- a/sections/login/login.php +++ b/sections/login/login.php @@ -59,9 +59,10 @@ if ($Attempts > 0) { ?>

- Lost your password? Recover it here! + Lost your password? Recover it here! +} +?>