X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=source%2Fmircoders%2Fservlet%2FServletModuleOpenIndy.java;h=a7c9fd5820a92cea295e74fd1f242eecac34e886;hb=bd42ea79e70f65a59814d5ade0a296a22399c9ae;hp=0f0f47aaa0f32b8c0d880fb300cce9bbc1dba40c;hpb=84272ce4d6d778cb73bdd2785eb72420187052f5;p=mir.git diff --git a/source/mircoders/servlet/ServletModuleOpenIndy.java b/source/mircoders/servlet/ServletModuleOpenIndy.java index 0f0f47aa..a7c9fd58 100755 --- a/source/mircoders/servlet/ServletModuleOpenIndy.java +++ b/source/mircoders/servlet/ServletModuleOpenIndy.java @@ -18,13 +18,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * In addition, as a special exception, The Mir-coders gives permission to link - * the code of this program with any library licensed under the Apache Software License, - * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library - * (or with modified versions of the above that use the same license as the above), - * and distribute linked combinations including the two. You must obey the - * GNU General Public License in all respects for all of the code used other than - * the above mentioned libraries. If you modify this file, you may extend this - * exception to your version of the file, but you are not obligated to do so. + * the code of this program with any library licensed under the Apache Software License, + * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library + * (or with modified versions of the above that use the same license as the above), + * and distribute linked combinations including the two. You must obey the + * GNU General Public License in all respects for all of the code used other than + * the above mentioned libraries. If you modify this file, you may extend this + * exception to your version of the file, but you are not obligated to do so. * If you do not wish to do so, delete this exception statement from your version. */ @@ -93,8 +93,7 @@ import mircoders.entity.EntityComment; import mircoders.entity.EntityContent; import mircoders.global.MirGlobal; import mircoders.media.MediaUploadProcessor; -import mircoders.media.UnsupportedMediaFormatExc; -import mircoders.module.ModuleComment; +import mircoders.module.*; import mircoders.module.ModuleContent; import mircoders.module.ModuleImages; import mircoders.module.ModuleTopics; @@ -122,7 +121,7 @@ import mircoders.storage.DatabaseTopics; * open-postings to the newswire * * @author mir-coders group - * @version $Id: ServletModuleOpenIndy.java,v 1.80 2003/04/21 12:42:51 idfx Exp $ + * @version $Id: ServletModuleOpenIndy.java,v 1.81 2003/04/26 00:42:22 zapata Exp $ * */ @@ -495,7 +494,8 @@ public class ServletModuleOpenIndy extends ServletModule EntityContent article = (EntityContent) contentModule.getById(cid); try { - MirGlobal.abuse().checkArticle(article, aRequest, aResponse); + MirGlobal.abuse().checkArticle( + article, new HTTPAdapters.HTTPRequestAdapter(aRequest), aResponse); MirGlobal.localizer().openPostings().afterContentPosting(article); } catch (Throwable t) { @@ -507,7 +507,7 @@ public class ServletModuleOpenIndy extends ServletModule e.printStackTrace(logger.asPrintWriter(LoggerWrapper.DEBUG_MESSAGE)); Throwable cause = ExceptionFunctions.traceCauseException(e); - if (cause instanceof UnsupportedMediaFormatExc) { + if (cause instanceof ModuleMediaType.UnsupportedMimeTypeExc) { throw new ServletModuleUserExc("media.unsupportedformat", new String[] {}); } throw new ServletModuleFailure(e); @@ -1108,9 +1108,7 @@ public class ServletModuleOpenIndy extends ServletModule Map data = new HashMap(); MessageResources messages = MessageResources.getMessageResources("bundles.open"); - data.put("errorstring", - messages.getMessage(getLocale(aRequest), anException.getMessage(), anException.getParameters()) - ); + data.put("errorstring", messages.getMessage(getLocale(aRequest), anException.getMessage(), anException.getParameters())); data.put("date", StringUtil.date2readableDateTime(new GregorianCalendar())); deliver(out, aRequest, aResponse, data, null, configuration.getString("ServletModule.OpenIndy.UserErrorTemplate"));