Return-Path: X-Original-To: apmail-manifoldcf-commits-archive@www.apache.org Delivered-To: apmail-manifoldcf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EFED210C38 for ; Wed, 25 Jun 2014 17:10:05 +0000 (UTC) Received: (qmail 7810 invoked by uid 500); 25 Jun 2014 17:10:05 -0000 Delivered-To: apmail-manifoldcf-commits-archive@manifoldcf.apache.org Received: (qmail 7770 invoked by uid 500); 25 Jun 2014 17:10:05 -0000 Mailing-List: contact commits-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list commits@manifoldcf.apache.org Received: (qmail 7761 invoked by uid 99); 25 Jun 2014 17:10:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jun 2014 17:10:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jun 2014 17:10:06 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 980092388994; Wed, 25 Jun 2014 17:09:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1605506 - /manifoldcf/branches/CONNECTORS-981/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java Date: Wed, 25 Jun 2014 17:09:41 -0000 To: commits@manifoldcf.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140625170941.980092388994@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kwright Date: Wed Jun 25 17:09:41 2014 New Revision: 1605506 URL: http://svn.apache.org/r1605506 Log: Test javascript, posting Modified: manifoldcf/branches/CONNECTORS-981/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java Modified: manifoldcf/branches/CONNECTORS-981/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-981/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java?rev=1605506&r1=1605505&r2=1605506&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-981/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java (original) +++ manifoldcf/branches/CONNECTORS-981/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java Wed Jun 25 17:09:41 2014 @@ -824,17 +824,17 @@ public class SolrConnector extends org.a " editconnection.maxdocumentlength.focus();\n"+ " return false;\n"+ " }\n"+ -" if (editconnection.maxdocumentlength.value == \"\" && editconnection.extractupdate.value != \"true\")\n"+ +" if (editconnection.maxdocumentlength.value == \"\" && (editconnection.extractupdate.value != \"true\" || (editconnection.extractupdate.checked == false)))\n"+ " {\n"+ " alert(\""+Messages.getBodyJavascriptString(locale,"SolrConnector.MaximumDocumentLengthRequiredUnlessExtractingUpdateHandler")+"\");\n"+ " SelectTab(\""+Messages.getBodyJavascriptString(locale,"SolrConnector.Documents")+"\");\n"+ " editconnection.maxdocumentlength.focus();\n"+ " return false;\n"+ " }\n"+ -" if (editconnection.contentfield.value == \"\" && editconnection.extractupdate.value != \"true\")\n"+ +" if (editconnection.contentfield.value == \"\" && (editconnection.extractupdate.value != \"true\" || (editconnection.extractupdate.checked == false)))\n"+ " {\n"+ " alert(\""+Messages.getBodyJavascriptString(locale,"SolrConnector.ContentFieldNameRequiredUnlessExtractingUpdateHandler")+"\");\n"+ -" SelectTab(\""+Messages.getBodyJavascriptString(locale,"SolrConnector.Documents")+"\");\n"+ +" SelectTab(\""+Messages.getBodyJavascriptString(locale,"SolrConnector.Schema")+"\");\n"+ " editconnection.contentfield.focus();\n"+ " return false;\n"+ " }\n"+ @@ -1484,7 +1484,8 @@ public class SolrConnector extends org.a " \n"+ " \n"+ " " + Messages.getBodyString(locale,"SolrConnector.UseExtractUpdateHandler") + "\n"+ -" \n" +" \n"+ +" \n" ); if (!useExtractUpdate.equals("false")) { @@ -1520,7 +1521,8 @@ public class SolrConnector extends org.a "\n"+ "\n"+ "\n"+ -"\n" +"\n"+ +"\n" ); } @@ -1824,10 +1826,15 @@ public class SolrConnector extends org.a if (contentField != null) parameters.setParameter(SolrConfig.PARAM_CONTENTFIELD,contentField); - String extractUpdate = variableContext.getParameter("extractupdate"); - if (extractUpdate != null) + String extractUpdatePresent = variableContext.getParameter("extractupdatepresent"); + if (extractUpdatePresent != null) + { + String extractUpdate = variableContext.getParameter("extractupdate"); + if (extractUpdate == null || extractUpdate.length() == 0) + extractUpdate = "false"; parameters.setParameter(SolrConfig.PARAM_EXTRACTUPDATE,extractUpdate); - + } + String realm = variableContext.getParameter("realm"); if (realm != null) parameters.setParameter(SolrConfig.PARAM_REALM,realm);