Skip to content

Commit e9bd4ee

Browse files
committed
Merge pull request #36 from luffy-xiao/patch-1
Update readFromFolder function in api
2 parents c357575 + 3157c3f commit e9bd4ee

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

SharePointAPI.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,15 +452,16 @@ public function read ($list_name, $limit = NULL, $query = NULL, $view = NULL, $s
452452
*
453453
* @param String $listName
454454
* @param String $folderName
455+
* @param bool $isLibrary
455456
* @param String $limit
456457
* @param String $query
457458
* @param String $view
458459
* @param String $sort
459460
*
460461
* @return Array
461462
*/
462-
public function readFromFolder($listName, $folderName = '', $limit = NULL, $query = NULL, $view = NULL, $sort = NULL) {
463-
return $this->read($list_name, $limit, $query, $view, $sort, "<Folder>" . $listName . '\\' . $folderName . "</Folder>" );
463+
public function readFromFolder($listName, $folderName = '', $isLibrary = false, $limit = NULL, $query = NULL, $view = NULL, $sort = NULL) {
464+
return $this->read($listName, $limit, $query, $view, $sort, "<Folder>" . ($isLibrary ? '' : 'Lists/') . $listName . '/' . $folderName . "</Folder>" );
464465
}
465466

466467
/**

0 commit comments

Comments
 (0)