@@ -, +, @@ --- .../data/mysql/atomicupdate/bug_19196_pagination_plugin.perl | 11 +++++++++++ installer/data/mysql/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences/web_services.pref | 6 ++++++ 3 files changed, 18 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_19196_pagination_plugin.perl --- a/installer/data/mysql/atomicupdate/bug_19196_pagination_plugin.perl +++ a/installer/data/mysql/atomicupdate/bug_19196_pagination_plugin.perl @@ -0,0 +1,11 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) + VALUES + ('RESTdefaultPageSize','20','','Set the default number of results returned by the REST API endpoints','Integer') + }); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 19278: Add a configurable default page size for REST endpoints)\n"; +} --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -452,6 +452,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'), ('ReservesMaxPickUpDelay','7','','Define the Maximum delay to pick up an item on hold','Integer'), ('ReservesNeedReturns','1','','If ON, a hold placed on an item available in this library must be checked-in, otherwise, a hold on a specific item, that is in the library & available is considered available','YesNo'), +('RESTdefaultPageSize','20','','Default page size for endpoints listing objects','Integer'), ('RestrictedPageLocalIPs','',NULL,'Beginning of IP addresses considered as local (comma separated ex: "127.0.0,127.0.2")','Free'), ('RestrictedPageContent','',NULL,'HTML content of the restricted page','TextArea'), ('RestrictedPageTitle','',NULL,'Title of the restricted page (breadcrumb and header)','Free'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref @@ -1,4 +1,10 @@ Web services: + REST API: + - + - "Set the default number of results returned by the REST API endpoints to" + - pref: "RESTdefaultPageSize" + class: integer + - "per page" OAI-PMH: - - pref: OAI-PMH --