Commit 998076d0 by Qiang Xue

Fixes #5665: The `currentPage` meta data in the RESTful result should be…

Fixes #5665: The `currentPage` meta data in the RESTful result should be 1-based, similar to that in HTTP headers
parent 16630a02
......@@ -8,6 +8,7 @@ Yii Framework 2 Change Log
- Bug #5402: Debugger was not loading when there were closures in asset classes (samdark)
- Bug #5584: `yii\rbac\DbRbacManager` should not delete items when deleting a rule on a database not supporting cascade update (mdmunir)
- Bug #5601: Simple conditions in Query::where() and ActiveQuery::where() did not allow `yii\db\Expression` to be used as the value (cebe, stevekr)
- Bug #5665: The `currentPage` meta data in the RESTful result should be 1-based, similar to that in HTTP headers (qiangxue)
- Bug: Gii console command help information does not contain global options (qiangxue)
- Enh #5223: Query builder now supports selecting sub-queries as columns (qiangxue)
- Enh #5587: `json_encode` is now used with `JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE` where it makes sense, also
......
......@@ -194,7 +194,7 @@ class Serializer extends Component
'_meta' => [
'totalCount' => $pagination->totalCount,
'pageCount' => $pagination->getPageCount(),
'currentPage' => $pagination->getPage(),
'currentPage' => $pagination->getPage() + 1,
'perPage' => $pagination->getPageSize(),
],
];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment