From: mh Date: Sun, 17 Feb 2002 12:59:55 +0000 (+0000) Subject: cleanup X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=8965650d20dfe51744fa4127dc814bad0d59045b;p=mir.git cleanup --- diff --git a/source/mir/misc/MpRequest.java b/source/mir/misc/MpRequest.java index fc191e2e..4bd90191 100755 --- a/source/mir/misc/MpRequest.java +++ b/source/mir/misc/MpRequest.java @@ -11,7 +11,8 @@ public class MpRequest{ String fileName=null; String fileContentType=null; - public MpRequest(byte[] i_uploadData, String i_fileName, String i_contentType){ + public MpRequest(byte[] i_uploadData, String i_fileName, + String i_contentType){ setFilename(i_fileName); setContentType(i_contentType); setMedia(i_uploadData); diff --git a/source/mircoders/servlet/ServletModuleOpenIndy.java b/source/mircoders/servlet/ServletModuleOpenIndy.java index ae502b52..66031a31 100755 --- a/source/mircoders/servlet/ServletModuleOpenIndy.java +++ b/source/mircoders/servlet/ServletModuleOpenIndy.java @@ -247,8 +247,7 @@ public class ServletModuleOpenIndy extends ServletModule if (to_topicsArr != null && to_topicsArr.length > 0) { try{ DatabaseContentToTopics.getInstance().setTopics(cid,to_topicsArr); - setTopic = true; - theLog.printError("setting content_x_topic success"); + setTopic = true; } catch (Exception e) { theLog.printError("setting content_x_topic failed"); contentModule.deleteById(cid); @@ -267,7 +266,7 @@ public class ServletModuleOpenIndy extends ServletModule //sends us. (the "Oreilly method") String contentType = mpReq.getContentType(); - theLog.printError("FROM BROWSER: "+contentType); + theLog.printInfo("FROM BROWSER: "+contentType); //if the client browser sent us unknown (text/plain is default) //or if we got application/octet-stream, it's possible that @@ -289,17 +288,15 @@ public class ServletModuleOpenIndy extends ServletModule * sure that it is in this file -mh */ contentType = FileUtil.guessContentTypeFromName(fileName); - theLog.printError("tYPE: "+contentType); if (contentType==null) contentType = "text/plain"; // rfc1867 says this is the default } HashMap mediaValues = new HashMap(); - theLog.printError("CONTENT TYPE IS: "+contentType); + theLog.printInfo("CONTENT TYPE IS: "+contentType); if (contentType.equals("text/plain") || contentType.equals("application/octet-stream")) { - System.err.println("IN HERE"); throw new ServletModuleUserException("One or more files of unrecognized types"); } @@ -335,7 +332,7 @@ public class ServletModuleOpenIndy extends ServletModule //get the class names from the media_type table. mediaTypeId = mediaTypesList.elementAt(0).getId(); try { - // ############### TODO: merge these and the getURL call into one + // ############### @todo: merge these and the getURL call into one // getURL helper call that just takes the Entity as a parameter // along with media_type mediaHandler = MediaHelper.getHandler(mediaTypesList.elementAt(0)); @@ -366,7 +363,6 @@ public class ServletModuleOpenIndy extends ServletModule mpReq=null; //we got this far, associate the media to the article - theLog.printError("ID"+mediaId); mediaEnt.setValueForProperty("is_published","1"); mediaEnt.update(); new ProducerMedia().handle(null,null,false,false,mediaId);