public
Last active

Enable Imports on my fork of Etherpad

  • Download Gist
Enabled-Imports.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
From c0ab5598975c4e9d092ea5793d99c8b7e229e384 Mon Sep 17 00:00:00 2001
From: Karteek E <nospam@karteek.net>
Date: Mon, 11 Jan 2010 03:26:55 +0530
Subject: [PATCH] Enabled Imports
 
---
infrastructure/net.appjet.oui/execution.scala | 6 +++---
infrastructure/net.appjet.oui/main.scala | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
 
diff --git a/infrastructure/net.appjet.oui/execution.scala b/infrastructure/net.appjet.oui/execution.scala
index b71da77..0fc2be0 100644
--- a/infrastructure/net.appjet.oui/execution.scala
+++ b/infrastructure/net.appjet.oui/execution.scala
@@ -34,7 +34,7 @@ import net.appjet.common.util.{HttpServletRequestFactory, BetterFile};
import Util.enumerationToRichEnumeration;
// Removed due to licensing issues; REMOVED_COS_OF_COS
-// import com.oreilly.servlet.MultipartFilter;
+import com.oreilly.servlet.MultipartFilter;
class RequestWrapper(val req: HttpServletRequest) {
req.setCharacterEncoding("UTF-8");
@@ -127,7 +127,7 @@ class RequestWrapper(val req: HttpServletRequest) {
null;
}
// Depends on cos.jar; REMOVED_COS_OF_COS
- /*
+
def files(globalScope: Scriptable): Object = {
if (! req.isInstanceOf[com.oreilly.servlet.MultipartWrapper]) {
new ScriptableAdapter();
@@ -158,7 +158,7 @@ class RequestWrapper(val req: HttpServletRequest) {
true);
}
}
- */
+
}
class ResponseWrapper(val res: HttpServletResponse) {
diff --git a/infrastructure/net.appjet.oui/main.scala b/infrastructure/net.appjet.oui/main.scala
index 64aef43..7875250 100644
--- a/infrastructure/net.appjet.oui/main.scala
+++ b/infrastructure/net.appjet.oui/main.scala
@@ -33,7 +33,7 @@ import org.mortbay.jetty.{Server, NCSARequestLog, Request, Response};
import org.mortbay.servlet.GzipFilter;
// removed due to license restrictions; REMOVED_COS_OF_COS
-// import com.oreilly.servlet.MultipartFilter;
+import com.oreilly.servlet.MultipartFilter;
import net.appjet.common.util.{BetterFile, HttpServletRequestFactory};
import net.appjet.common.cli._;
@@ -222,9 +222,9 @@ object main {
// removed due to license restrictions; REMOVED_COS_OF_COS
- // val filterHolder = new FilterHolder(new MultipartFilter());
- // filterHolder.setInitParameter("uploadDir", System.getProperty("java.io.tmpdir"));
- // handler.addFilter(filterHolder, "/*", 1);
+ val filterHolder = new FilterHolder(new MultipartFilter());
+ filterHolder.setInitParameter("uploadDir", System.getProperty("java.io.tmpdir"));
+ handler.addFilter(filterHolder, "/*", 1);
global.context = handler;
--
1.6.5

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.