*** empty log message ***
[mir.git] / source / mircoders / storage / DatabaseUploadedMedia.java
index 158d21c..428edc4 100755 (executable)
@@ -54,15 +54,16 @@ public class DatabaseUploadedMedia extends Database implements StorageObject {
    * returns the comments that belong to the article (via entityrelation)
    * where db-flag is_published is true
    */
-  public SimpleList getMediaType(EntityUploadedMedia ent) {
-    SimpleList comments=null;
+  public Entity getMediaType(Entity ent) throws StorageObjectException {
+    Entity type=null;
     try {
-      comments = relationMediaType.getManyAsSimpleList(ent,"webdb_create","is_published='1'");
+      type = relationMediaType.getOne(ent);
     }
     catch (StorageObjectException e) {
       theLog.printError("DatabaseUploadedMedia :: failed to get media_type");
+      throw new StorageObjectException("DatabaseUploadedMedia :: failed to get media_type"+ e.toString());
     }
-    return comments;
+    return type;
   }
 
 }