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

Commit 39f96fa9 authored by Mike Sheldon's avatar Mike Sheldon

Include count of tag usage in artist.getTopTags

parent 31c9b5c4
......@@ -103,10 +103,11 @@ class ArtistXML {
$root->addAttribute('artist', $artist->name);
$tags = $artist->getTopTags();
foreach($tags as $tag) {
foreach($tags as &$tag) {
$tag_node = $root->addChild('tag', null);
$tag_node->addChild('name', repamp($tag));
$tag_node->addChild('url', Server::getTagURL($tag));
$tag_node->addChild('name', repamp($tag['tag']));
$tag_node->addChild('count', $tag['freq']);
$tag_node->addChild('url', Server::getTagURL($tag['tag']));
}
return $xml;
......
......@@ -153,12 +153,7 @@ class Artist {
. ' GROUP BY tag ORDER BY freq DESC '
. ' LIMIT ' . $limit);
$tags = array();
foreach($res as &$row) {
$tags[] = $row['tag'];
}
return $tags;
return $res;
}
}
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