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 2013/09/10 16:27:39 UTC
svn commit: r1521507 - in /manifoldcf/integration/sharepoint-2010/trunk: ./
CHANGES.txt webservice/ webservice/MCPermissions.cs
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 = "<OrderBy Override=\"TRUE\"><FieldRef Name=\"FileRef\" /></OrderBy>";
- listQuery.QueryThrottleMode = SPQueryThrottleOption.Override;
- listQuery.ViewAttributes = "Scope=\"Recursive\"";
- listQuery.ViewFields = "<FieldRef Name='FileRef' />";
- 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 = "<OrderBy Override=\"TRUE\"><FieldRef Name=\"FileRef\" /></OrderBy>";
+ listQuery.QueryThrottleMode = SPQueryThrottleOption.Override;
+ listQuery.ViewAttributes = "Scope=\"Recursive\"";
+ listQuery.ViewFields = "<FieldRef Name='FileRef' />";
+ 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);
}
}