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

Commit b0e53ba5 authored by clint's avatar clint

not sure if the logic should go in the class or in tpl

parent fbaf53d2
......@@ -98,6 +98,13 @@ class User {
$data = $res->fetchAll(MDB2_FETCHMODE_ASSOC);
foreach($data as &$i) {
$i = sanitize($i);
if($i["name"] == "") {
$clientstr = strip_tags(stripslashes($i["client"])) . "(unknown, please tell us what this is)";
} else {
$clientstr = "<a href=\"" . strip_tags(stripslashes($i["url"])) . "\">" . strip_tags(stripslashes($i["name"])) . "</a>";
}
$i["clientstr"] = $clientstr;
}
return $data;
}
......
......@@ -24,7 +24,7 @@
<h3>Now Playing:</h3>
<ul>
{section name=i loop=$nowplaying}
<li>{$nowplaying[i].track} by {$nowplaying[i].artist} with {$nowplaying[i].client}</li>
<li>{$nowplaying[i].track} by {$nowplaying[i].artist} with {$nowplaying[i].clientstr}</li>
{/section}
</ul>
{/if}
......
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