summaryrefslogtreecommitdiffstats
path: root/lib/class
diff options
context:
space:
mode:
Diffstat (limited to 'lib/class')
-rw-r--r--lib/class/artist.class.php1
-rw-r--r--lib/class/database_object.abstract.php3
-rw-r--r--lib/class/xmldata.class.php6
3 files changed, 6 insertions, 4 deletions
diff --git a/lib/class/artist.class.php b/lib/class/artist.class.php
index d488e003..638c5998 100644
--- a/lib/class/artist.class.php
+++ b/lib/class/artist.class.php
@@ -243,7 +243,6 @@ class Artist extends database_object {
$this->f_tags = Tag::get_display($this->tags,$this->id,'artist');
-
return true;
} // format
diff --git a/lib/class/database_object.abstract.php b/lib/class/database_object.abstract.php
index e26b22df..d7408f4e 100644
--- a/lib/class/database_object.abstract.php
+++ b/lib/class/database_object.abstract.php
@@ -39,6 +39,9 @@ abstract class database_object {
$table_name = $table_name ? Dba::escape($table_name) : Dba::escape(strtolower(get_class($this)));
+ // Make sure we've got a real id
+ if (!is_numeric($id)) { return array(); }
+
if (self::is_cached($table_name,$id)) {
return self::get_from_cache($table_name,$id);
}
diff --git a/lib/class/xmldata.class.php b/lib/class/xmldata.class.php
index 71554464..cfb8805f 100644
--- a/lib/class/xmldata.class.php
+++ b/lib/class/xmldata.class.php
@@ -130,10 +130,10 @@ class xmlData {
$string = '';
- foreach ($tags as $tag_id) {
+ foreach ($tags as $tag_id=>$data) {
+
$tag = new Tag($tag_id);
- $tag->format($type,$object_id);
- $string .= "\t<tag id=\"$tag->id\" count=\"$tag->weight\"><![CDATA[$tag->name]]></tag>\n";
+ $string .= "\t<tag id=\"" . $tag->id . "\" count=\"" . $data['count'] . "\"><![CDATA[$tag->name]]></tag>\n";
}
return $string;