Merge pull request #19041 from owncloud/issue-19007-parameter-name
Fix parameter name to match the specs
This commit is contained in:
commit
474f13c9d6
|
@ -292,7 +292,7 @@ class Sharees {
|
||||||
$search = isset($_GET['search']) ? (string) $_GET['search'] : '';
|
$search = isset($_GET['search']) ? (string) $_GET['search'] : '';
|
||||||
$itemType = isset($_GET['itemType']) ? (string) $_GET['itemType'] : null;
|
$itemType = isset($_GET['itemType']) ? (string) $_GET['itemType'] : null;
|
||||||
$page = !empty($_GET['page']) ? max(1, (int) $_GET['page']) : 1;
|
$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 = [
|
$shareTypes = [
|
||||||
Share::SHARE_TYPE_USER,
|
Share::SHARE_TYPE_USER,
|
||||||
|
@ -374,7 +374,7 @@ class Sharees {
|
||||||
'search' => $search,
|
'search' => $search,
|
||||||
'itemType' => $itemType,
|
'itemType' => $itemType,
|
||||||
'shareType' => $shareTypes,
|
'shareType' => $shareTypes,
|
||||||
'limit' => $perPage,
|
'perPage' => $perPage,
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -668,21 +668,21 @@ class ShareesTest extends TestCase {
|
||||||
'page' => 10,
|
'page' => 10,
|
||||||
], '', true, '', null, $allTypes, 10, 200, false],
|
], '', true, '', null, $allTypes, 10, 200, false],
|
||||||
|
|
||||||
// Test limit
|
// Test perPage
|
||||||
[[
|
[[
|
||||||
'limit' => 0,
|
'perPage' => 0,
|
||||||
], '', true, '', null, $allTypes, 1, 200, false],
|
], '', true, '', null, $allTypes, 1, 200, false],
|
||||||
[[
|
[[
|
||||||
'limit' => '0',
|
'perPage' => '0',
|
||||||
], '', true, '', null, $allTypes, 1, 200, false],
|
], '', true, '', null, $allTypes, 1, 200, false],
|
||||||
[[
|
[[
|
||||||
'limit' => -1,
|
'perPage' => -1,
|
||||||
], '', true, '', null, $allTypes, 1, 1, false],
|
], '', true, '', null, $allTypes, 1, 1, false],
|
||||||
[[
|
[[
|
||||||
'limit' => 1,
|
'perPage' => 1,
|
||||||
], '', true, '', null, $allTypes, 1, 1, false],
|
], '', true, '', null, $allTypes, 1, 1, false],
|
||||||
[[
|
[[
|
||||||
'limit' => 10,
|
'perPage' => 10,
|
||||||
], '', true, '', null, $allTypes, 1, 10, false],
|
], '', true, '', null, $allTypes, 1, 10, false],
|
||||||
|
|
||||||
// Test $shareWithGroupOnly setting
|
// Test $shareWithGroupOnly setting
|
||||||
|
@ -951,8 +951,8 @@ class ShareesTest extends TestCase {
|
||||||
|
|
||||||
public function dataGetPaginationLink() {
|
public function dataGetPaginationLink() {
|
||||||
return [
|
return [
|
||||||
[1, '/ocs/v1.php', ['limit' => 2], '<?limit=2&page=2>; rel="next"'],
|
[1, '/ocs/v1.php', ['perPage' => 2], '<?perPage=2&page=2>; rel="next"'],
|
||||||
[10, '/ocs/v2.php', ['limit' => 2], '<?limit=2&page=11>; rel="next"'],
|
[10, '/ocs/v2.php', ['perPage' => 2], '<?perPage=2&page=11>; rel="next"'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue