From 72a4ce57462288ed9a8f711638b33a8fcfe73d70 Mon Sep 17 00:00:00 2001 From: zapata Date: Tue, 21 Feb 2006 20:24:43 +0000 Subject: [PATCH] changed the behaviour of entity uploaded media so that articles/comments linking to the media will no longer be marked unproduced --- source/mircoders/entity/EntityUploadedMedia.java | 30 +----------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/source/mircoders/entity/EntityUploadedMedia.java b/source/mircoders/entity/EntityUploadedMedia.java index 3003aa09..b28cdb10 100755 --- a/source/mircoders/entity/EntityUploadedMedia.java +++ b/source/mircoders/entity/EntityUploadedMedia.java @@ -34,43 +34,15 @@ import mir.entity.Entity; import mir.storage.DatabaseFailure; import mircoders.storage.DatabaseUploadedMedia; -import java.sql.SQLException; import java.util.Map; /** * * @author mh, mir-coders group - * @version $Id: EntityUploadedMedia.java,v 1.26.2.14 2005/12/23 21:56:28 zapata Exp $ + * @version $Id: EntityUploadedMedia.java,v 1.26.2.15 2006/02/21 20:24:43 zapata Exp $ */ public class EntityUploadedMedia extends AbstractEntity { - public void update() throws DatabaseFailure { - super.update(); - - try { - database.executeUpdate( - "update content " + - "set is_produced='0' " + - "from content_x_media cxm " + - "where" + - " cxm.content_id=content.id and cxm.media_id=" + getId() - ); - - database.executeUpdate( - "update content " + - "set is_produced='0' " + - "from comment_x_media cxm, comment c "+ - "where " + - " cxm.comment_id = c.id and " + - " c.to_media=content.id and " + - " cxm.media_id=" + getId() - ); - } - catch (SQLException e) { - throw new DatabaseFailure(e); - } - } - public void setFieldValues(Map theStringValues) { if (theStringValues != null) { if (!theStringValues.containsKey("is_published")) -- 2.11.0