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

Commit 3c9b3849 authored by jurgbohn's avatar jurgbohn

A bit more useful output when the system can't find artist / album / track.

parent 624ce842
......@@ -48,7 +48,7 @@ class Album {
. 'name = ' . $mdb2->quote($name, 'text') . ' AND '
. 'artist_name = ' . $mdb2->quote($artist, 'text'));
if(!$res->numRows()) {
$this->name = 'No such album.';
$this->name = 'No such album: ' . $name;
} else {
$row = sanitize($res->fetchRow(MDB2_FETCHMODE_ASSOC));
$this->name = $row['name'];
......
......@@ -52,7 +52,7 @@ class Artist {
. "mbid = " . $mdb2->quote($mbid, "text") . " OR "
. "name = " . $mdb2->quote($name, "text"));
if(!$res->numRows()) {
PEAR::raiseError("No such artist.");
PEAR::raiseError("No such artist: " . $name);
} else {
$row = sanitize($res->fetchRow(MDB2_FETCHMODE_ASSOC));
$this->name = $row["name"];
......
......@@ -50,7 +50,7 @@ class Track {
. "name = " . $mdb2->quote($name, "text") . " AND "
. "artist = " . $mdb2->quote($artist, "text"));
if(!$res->numRows()) {
$this->name = "No such track.";
$this->name = "No such track: " . $name;
} else {
$row = sanitize($res->fetchRow(MDB2_FETCHMODE_ASSOC));
$this->name = $row["name"];
......
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