summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-09-15 12:14:14 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-09-15 12:14:14 +0200
commit665716095b719a9804f9104c42ce72254d3125ff (patch)
tree35a5fd7f5799f702660a60c7c84a46f8e19a4732
parent1d315512eaec830008f9d9a500342fadef9595c1 (diff)
downloadnextcloud-server-665716095b719a9804f9104c42ce72254d3125ff.tar.gz
nextcloud-server-665716095b719a9804f9104c42ce72254d3125ff.zip
Fix parameter name to match the specs
-rw-r--r--apps/files_sharing/api/sharees.php4
-rw-r--r--apps/files_sharing/tests/api/shareestest.php16
2 files changed, 10 insertions, 10 deletions
diff --git a/apps/files_sharing/api/sharees.php b/apps/files_sharing/api/sharees.php
index d7eabb9a550..924a9dd1cd7 100644
--- a/apps/files_sharing/api/sharees.php
+++ b/apps/files_sharing/api/sharees.php
@@ -292,7 +292,7 @@ class Sharees {
$search = isset($_GET['search']) ? (string) $_GET['search'] : '';
$itemType = isset($_GET['itemType']) ? (string) $_GET['itemType'] : null;
$page = !empty($_GET['page']) ? max(1, (int) $_GET['page']) : 1;
- $perPage = !empty($_GET['limit']) ? max(1, (int) $_GET['limit']) : 200;
+ $perPage = !empty($_GET['perPage']) ? max(1, (int) $_GET['perPage']) : 200;
$shareTypes = [
Share::SHARE_TYPE_USER,
@@ -374,7 +374,7 @@ class Sharees {
'search' => $search,
'itemType' => $itemType,
'shareType' => $shareTypes,
- 'limit' => $perPage,
+ 'perPage' => $perPage,
]));
}
diff --git a/apps/files_sharing/tests/api/shareestest.php b/apps/files_sharing/tests/api/shareestest.php
index 1e4438acd88..1e28cb8ed5a 100644
--- a/apps/files_sharing/tests/api/shareestest.php
+++ b/apps/files_sharing/tests/api/shareestest.php
@@ -668,21 +668,21 @@ class ShareesTest extends TestCase {
'page' => 10,
], '', true, '', null, $allTypes, 10, 200, false],
- // Test limit
+ // Test perPage
[[
- 'limit' => 0,
+ 'perPage' => 0,
], '', true, '', null, $allTypes, 1, 200, false],
[[
- 'limit' => '0',
+ 'perPage' => '0',
], '', true, '', null, $allTypes, 1, 200, false],
[[
- 'limit' => -1,
+ 'perPage' => -1,
], '', true, '', null, $allTypes, 1, 1, false],
[[
- 'limit' => 1,
+ 'perPage' => 1,
], '', true, '', null, $allTypes, 1, 1, false],
[[
- 'limit' => 10,
+ 'perPage' => 10,
], '', true, '', null, $allTypes, 1, 10, false],
// Test $shareWithGroupOnly setting
@@ -951,8 +951,8 @@ class ShareesTest extends TestCase {
public function dataGetPaginationLink() {
return [
- [1, '/ocs/v1.php', ['limit' => 2], '<?limit=2&page=2>; rel="next"'],
- [10, '/ocs/v2.php', ['limit' => 2], '<?limit=2&page=11>; rel="next"'],
+ [1, '/ocs/v1.php', ['perPage' => 2], '<?perPage=2&page=2>; rel="next"'],
+ [10, '/ocs/v2.php', ['perPage' => 2], '<?perPage=2&page=11>; rel="next"'],
];
}