1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-05 10:49:37 +02:00

implement xml error codes rather then relying on string parsing

This commit is contained in:
Karl 'vollmerk' Vollmer 2008-03-20 07:52:51 +00:00
parent 17244cee94
commit 06652fe040
2 changed files with 13 additions and 14 deletions

View file

@ -70,9 +70,10 @@ class xmlData {
* This generates a standard XML Error message
* nothing fancy here...
*/
public static function error($string) {
public static function error($code,$string) {
$string = self::_header() . "\t<error><![CDATA[$string]]></error>" . self::_footer();
$string = self::_header() . "\t<error code=\"$code\"><![CDATA[$string]]></error>" . self::_footer();
return $string;
} // error