You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2011/05/01 23:55:17 UTC

svn commit: r1098419 - in /incubator/lcf/trunk: CHANGES.txt framework/crawler-ui/src/main/webapp/editjob.jsp framework/crawler-ui/src/main/webapp/execute.jsp

Author: kwright
Date: Sun May  1 21:55:17 2011
New Revision: 1098419

URL: http://svn.apache.org/viewvc?rev=1098419&view=rev
Log:
Fix for CONNECTORS-192.

Modified:
    incubator/lcf/trunk/CHANGES.txt
    incubator/lcf/trunk/framework/crawler-ui/src/main/webapp/editjob.jsp
    incubator/lcf/trunk/framework/crawler-ui/src/main/webapp/execute.jsp

Modified: incubator/lcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/CHANGES.txt?rev=1098419&r1=1098418&r2=1098419&view=diff
==============================================================================
--- incubator/lcf/trunk/CHANGES.txt (original)
+++ incubator/lcf/trunk/CHANGES.txt Sun May  1 21:55:17 2011
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 0.3-dev =========================
 
+CONNECTORS-192: Specification processing would sometimes be called
+without the specification data being posted.
+(Karl Wright)
+
 CONNECTORS-191: Fix eol-style attribute for .bat files to always be
 CRLF.
 (Karl Wright)

Modified: incubator/lcf/trunk/framework/crawler-ui/src/main/webapp/editjob.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/crawler-ui/src/main/webapp/editjob.jsp?rev=1098419&r1=1098418&r2=1098419&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/crawler-ui/src/main/webapp/editjob.jsp (original)
+++ incubator/lcf/trunk/framework/crawler-ui/src/main/webapp/editjob.jsp Sun May  1 21:55:17 2011
@@ -1116,6 +1116,9 @@
 			{
 				OutputConnectorFactory.release(outputConnector);
 			}
+%>
+		  <input type="hidden" name="outputpresent" value="true"/>
+<%
 		}
 	}
 
@@ -1133,6 +1136,9 @@
 			{
 				RepositoryConnectorFactory.release(repositoryConnector);
 			}
+%>
+		  <input type="hidden" name="connectionpresent" value="true"/>
+<%
 		}
 	}
 %>

Modified: incubator/lcf/trunk/framework/crawler-ui/src/main/webapp/execute.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/crawler-ui/src/main/webapp/execute.jsp?rev=1098419&r1=1098418&r2=1098419&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/crawler-ui/src/main/webapp/execute.jsp (original)
+++ incubator/lcf/trunk/framework/crawler-ui/src/main/webapp/execute.jsp Sun May  1 21:55:17 2011
@@ -479,8 +479,14 @@
 					if (job == null)
 						job = manager.createJob();
 
-					// Gather all the data from the form.
-					String x = variableContext.getParameter("description");
+					// Figure out what got posted.
+					String x = variableContext.getParameter("connectionpresent");
+					boolean connectionPresent = (x != null && x.equals("true"));
+					x = variableContext.getParameter("outputpresent");
+					boolean outputPresent = (x != null && x.equals("true"));
+					
+					// Gather the rest of the data.
+					x = variableContext.getParameter("description");
 					if (x != null)
 						job.setDescription(x);
 					x = variableContext.getParameter("outputname");
@@ -705,7 +711,6 @@
 						{
 							job.clearHopCountFilters();
 							int j = 0;
-							job.clearHopCountFilters();
 							while (j < relationshipTypes.length)
 							{
 								String relationshipType = relationshipTypes[j++];
@@ -718,7 +723,7 @@
 						}
 					}
 					
-					if (outputConnection != null)
+					if (outputPresent && outputConnection != null)
 					{
 						IOutputConnector outputConnector = OutputConnectorFactory.grab(threadContext,
 							outputConnection.getClassName(),outputConnection.getConfigParams(),outputConnection.getMaxConnections());
@@ -743,7 +748,7 @@
 						}
 					}
 					
-					if (connection != null)
+					if (connectionPresent && connection != null)
 					{
 						IRepositoryConnector repositoryConnector = RepositoryConnectorFactory.grab(threadContext,
 							connection.getClassName(),connection.getConfigParams(),connection.getMaxConnections());