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 E5827C2BB for ; Tue, 10 Sep 2013 14:28:01 +0000 (UTC) Received: (qmail 23946 invoked by uid 500); 10 Sep 2013 14:28:01 -0000 Delivered-To: apmail-manifoldcf-commits-archive@manifoldcf.apache.org Received: (qmail 23895 invoked by uid 500); 10 Sep 2013 14:28:01 -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 23887 invoked by uid 99); 10 Sep 2013 14:28:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Sep 2013 14:28:01 +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; Tue, 10 Sep 2013 14:27:59 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B7DDB2388ABB; Tue, 10 Sep 2013 14:27:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1521507 - in /manifoldcf/integration/sharepoint-2010/trunk: ./ CHANGES.txt webservice/ webservice/MCPermissions.cs Date: Tue, 10 Sep 2013 14:27:39 -0000 To: commits@manifoldcf.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130910142739.B7DDB2388ABB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kwright Date: Tue Sep 10 14:27:39 2013 New Revision: 1521507 URL: http://svn.apache.org/r1521507 Log: Fix for CONNECTORS-772. Modified: manifoldcf/integration/sharepoint-2010/trunk/ (props changed) manifoldcf/integration/sharepoint-2010/trunk/CHANGES.txt manifoldcf/integration/sharepoint-2010/trunk/webservice/ (props changed) manifoldcf/integration/sharepoint-2010/trunk/webservice/MCPermissions.cs Propchange: manifoldcf/integration/sharepoint-2010/trunk/ ------------------------------------------------------------------------------ Merged /manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772:r1521291-1521503 Modified: manifoldcf/integration/sharepoint-2010/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/manifoldcf/integration/sharepoint-2010/trunk/CHANGES.txt?rev=1521507&r1=1521506&r2=1521507&view=diff ============================================================================== --- manifoldcf/integration/sharepoint-2010/trunk/CHANGES.txt (original) +++ manifoldcf/integration/sharepoint-2010/trunk/CHANGES.txt Tue Sep 10 14:27:39 2013 @@ -3,6 +3,10 @@ $Id$ ======================= 0.3-dev ===================== +CONNECTORS-772: SharePoint on AWS does not permit using the +URL to locate the site. +(Dmitry Goldenberg, Karl Wright) + CONNECTORS-754: Remove dependency on Permissions.asmx. (Will Parkinson, Karl Wright) Propchange: manifoldcf/integration/sharepoint-2010/trunk/webservice/ ------------------------------------------------------------------------------ Merged /manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772/webservice:r1521291-1521503 Modified: manifoldcf/integration/sharepoint-2010/trunk/webservice/MCPermissions.cs URL: http://svn.apache.org/viewvc/manifoldcf/integration/sharepoint-2010/trunk/webservice/MCPermissions.cs?rev=1521507&r1=1521506&r2=1521507&view=diff ============================================================================== --- manifoldcf/integration/sharepoint-2010/trunk/webservice/MCPermissions.cs (original) +++ manifoldcf/integration/sharepoint-2010/trunk/webservice/MCPermissions.cs Tue Sep 10 14:27:39 2013 @@ -93,56 +93,53 @@ namespace MetaCarta.SharePoint.SoapServe uint startRowParam = Convert.ToUInt32(startRow); uint rowLimitParam = Convert.ToUInt32(rowLimit); - using (SPSite site = new SPSite(SPContext.Current.Web.Url)) + using (SPWeb oWebsiteRoot = SPContext.Current.Web) { - using (SPWeb oWebsiteRoot = site.OpenWeb()) + if (oWebsiteRoot != null) { - if (oWebsiteRoot != null) - { - oWebsiteRoot.Lists.IncludeRootFolder = true; - SPList oList = oWebsiteRoot.Lists[new Guid(listName)]; + oWebsiteRoot.Lists.IncludeRootFolder = true; + SPList oList = oWebsiteRoot.Lists[new Guid(listName)]; - SPQuery listQuery = new SPQuery(); - listQuery.Query = ""; - listQuery.QueryThrottleMode = SPQueryThrottleOption.Override; - listQuery.ViewAttributes = "Scope=\"Recursive\""; - listQuery.ViewFields = ""; - listQuery.RowLimit = 1000; - - XmlDocument doc = new XmlDocument(); - retVal = doc.CreateElement("GetListItems", - "http://schemas.microsoft.com/sharepoint/soap/directory/"); - XmlNode getListItemsNode = doc.CreateElement("GetListItemsResponse"); + SPQuery listQuery = new SPQuery(); + listQuery.Query = ""; + listQuery.QueryThrottleMode = SPQueryThrottleOption.Override; + listQuery.ViewAttributes = "Scope=\"Recursive\""; + listQuery.ViewFields = ""; + listQuery.RowLimit = 1000; + + XmlDocument doc = new XmlDocument(); + retVal = doc.CreateElement("GetListItems", + "http://schemas.microsoft.com/sharepoint/soap/directory/"); + XmlNode getListItemsNode = doc.CreateElement("GetListItemsResponse"); - uint counter = 0; - do - { - if (counter >= startRowParam + rowLimitParam) - break; + uint counter = 0; + do + { + if (counter >= startRowParam + rowLimitParam) + break; - SPListItemCollection collListItems = oList.GetItems(listQuery); + SPListItemCollection collListItems = oList.GetItems(listQuery); - foreach (SPListItem oListItem in collListItems) + foreach (SPListItem oListItem in collListItems) + { + if (counter >= startRowParam && counter < startRowParam + rowLimitParam) { - if (counter >= startRowParam && counter < startRowParam + rowLimitParam) - { - XmlNode resultNode = doc.CreateElement("GetListItemsResult"); - XmlAttribute idAttribute = doc.CreateAttribute("FileRef"); - idAttribute.Value = oListItem.Url; - resultNode.Attributes.Append(idAttribute); - getListItemsNode.AppendChild(resultNode); - } - counter++; + XmlNode resultNode = doc.CreateElement("GetListItemsResult"); + XmlAttribute idAttribute = doc.CreateAttribute("FileRef"); + idAttribute.Value = oListItem.Url; + resultNode.Attributes.Append(idAttribute); + getListItemsNode.AppendChild(resultNode); } + counter++; + } - listQuery.ListItemCollectionPosition = collListItems.ListItemCollectionPosition; + listQuery.ListItemCollectionPosition = collListItems.ListItemCollectionPosition; - } while (listQuery.ListItemCollectionPosition != null); + } while (listQuery.ListItemCollectionPosition != null); - retVal.AppendChild(getListItemsNode); - } + retVal.AppendChild(getListItemsNode); } }