We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 7969c97a authored by P. J. McDermott's avatar P. J. McDermott

Catch Exceptions from TagCloud::generateTagCloud().

parent e38e7df5
...@@ -379,12 +379,16 @@ class Group { ...@@ -379,12 +379,16 @@ class Group {
} }
function tagCloudData () { function tagCloudData () {
return TagCloud::generateTagCloud( try {
TagCloud::scrobblesTable('group').' s LEFT JOIN Users u ON s.userid=u.uniqueid LEFT JOIN Group_Members gm ON u.uniqueid=gm.member LEFT JOIN Groups g ON gm.grp=g.id', return TagCloud::generateTagCloud(
'artist', TagCloud::scrobblesTable('group').' s LEFT JOIN Users u ON s.userid=u.uniqueid LEFT JOIN Group_Members gm ON u.uniqueid=gm.member LEFT JOIN Groups g ON gm.grp=g.id',
40, 'artist',
$this->name, 40,
'groupname'); $this->name,
'groupname');
} catch (Exception $e) {
return false;
}
} }
} }
...@@ -25,9 +25,9 @@ require_once('data/sanitize.php'); ...@@ -25,9 +25,9 @@ require_once('data/sanitize.php');
require_once('data/Server.php'); require_once('data/Server.php');
require_once('data/TagCloud.php'); require_once('data/TagCloud.php');
$aTagCloud = TagCloud::GenerateTagCloud('loved_tracks', 'artist'); try {
if ($aTagCloud) { $aTagCloud = TagCloud::GenerateTagCloud('loved_tracks', 'artist');
$smarty->assign('tagcloud', $aTagCloud); $smarty->assign('tagcloud', $aTagCloud);
} } catch (Exception $e) {}
$smarty->display("popular.tpl"); $smarty->display("popular.tpl");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment