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

Commit 7ee2f94e authored by P. J. McDermott's avatar P. J. McDermott

Catch Exceptions from TagCloud::generateTagCloud().

parent 566f4dbe
......@@ -379,12 +379,16 @@ class Group {
}
function tagCloudData () {
return TagCloud::generateTagCloud(
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',
'artist',
40,
$this->name,
'groupname');
try {
return TagCloud::generateTagCloud(
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',
'artist',
40,
$this->name,
'groupname');
} catch (Exception $e) {
return false;
}
}
}
......@@ -25,9 +25,9 @@ require_once('data/sanitize.php');
require_once('data/Server.php');
require_once('data/TagCloud.php');
$aTagCloud = TagCloud::GenerateTagCloud('loved_tracks', 'artist');
if ($aTagCloud) {
try {
$aTagCloud = TagCloud::GenerateTagCloud('loved_tracks', 'artist');
$smarty->assign('tagcloud', $aTagCloud);
}
} catch (Exception $e) {}
$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