* 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.
*/
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;
* 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 $
*
*/
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) {
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);
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"));