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 2012/09/06 19:41:54 UTC
svn commit: r1381693 -
/manifoldcf/integration/sharepoint-2010/trunk/webservice/MCPermissions.cs
Author: kwright
Date: Thu Sep 6 17:41:53 2012
New Revision: 1381693
URL: http://svn.apache.org/viewvc?rev=1381693&view=rev
Log:
Fix pagination issue
Modified:
manifoldcf/integration/sharepoint-2010/trunk/webservice/MCPermissions.cs
Modified: manifoldcf/integration/sharepoint-2010/trunk/webservice/MCPermissions.cs
URL: http://svn.apache.org/viewvc/manifoldcf/integration/sharepoint-2010/trunk/webservice/MCPermissions.cs?rev=1381693&r1=1381692&r2=1381693&view=diff
==============================================================================
--- manifoldcf/integration/sharepoint-2010/trunk/webservice/MCPermissions.cs (original)
+++ manifoldcf/integration/sharepoint-2010/trunk/webservice/MCPermissions.cs Thu Sep 6 17:41:53 2012
@@ -110,30 +110,25 @@ namespace MetaCarta.SharePoint.SoapServe
listQuery.ViewAttributes = "Scope=\"Recursive\"";
listQuery.ViewFields = string.Concat(
"<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;
- // Will this work? Or will it reset something unexpected?
- if (startRowParam + rowLimitParam - counter < 1000)
- listQuery.RowLimit = startRowParam + rowLimitParam - counter;
-
SPListItemCollection collListItems = oList.GetItems(listQuery);
- XmlDocument doc = new XmlDocument();
- retVal = doc.CreateElement("GetListItems",
- "http://schemas.microsoft.com/sharepoint/soap/directory/");
- XmlNode getListItemsNode = doc.CreateElement("GetListItemsResponse");
foreach (SPListItem oListItem in collListItems)
{
- if (counter >= startRowParam)
+ if (counter >= startRowParam && counter < startRowParam + rowLimitParam)
{
XmlNode resultNode = doc.CreateElement("GetListItemsResult");
XmlAttribute idAttribute = doc.CreateAttribute("FileRef");
@@ -144,8 +139,9 @@ namespace MetaCarta.SharePoint.SoapServe
counter++;
}
- retVal.AppendChild(getListItemsNode);
} while (listQuery.ListItemCollectionPosition != null);
+
+ retVal.AppendChild(getListItemsNode);
}
}