INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('AutoResumeSuspendedHolds', '1', NULL , 'Allow suspended holds to be automatically resumed by a set date.', 'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacStarRatings','all',NULL,'disable|all|details','Choice');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacBrowseResults','1','Disable/enable browsing and paging search results from the OPAC detail page.',NULL,'YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SvcMaxReportRows','10','Maximum number of rows to return via the report web service.',NULL,'Integer');
SetVersion($DBversion);
}
+$DBversion = "3.09.00.XXX";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SvcMaxReportRows','10','Maximum number of rows to return via the report web service.',NULL,'Integer');");
+ print "Upgrade to $DBversion done (Added SvcMaxReportRows syspref)\n";
+ SetVersion($DBversion);
+}
+
=head1 FUNCTIONS
=head2 TableExists($table)
-Web Services:
+Web services:
OAI-PMH:
-
- pref: OAI-PMH
- pref: ILS-DI:AuthorizedIPs
class: Text
- allowed IPs to use the ILS-DI services
+ Reporting:
+ -
+ - Only return
+ - pref: SvcMaxReportRows
+ class: integer
+ - rows of a report requested via the reports web service.
print $query->header;
my $offset = 0;
-my $limit = 10;
+my $limit = C4::Context->preference("SvcMaxReportRows") || 10;
my ( $sth, $errors ) = execute_query( $sql, $offset, $limit );
my $lines = $sth->fetchall_arrayref;
my $json_text = to_json($lines);
my $report = $query->param('id');
my $cache;
-my $usecache = C4::Context->preference('usecache');
+my $usecache = C4::Context->ismemcached;
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{
my ( $sql, $type, $name, $notes, $cache_expiry, $public ) =
get_saved_report($report);
my $offset = 0;
-my $limit = 10;
+my $limit = C4::Context->preference("SvcMaxReportRows") || 10;
my ( $sth, $errors ) = execute_query( $sql, $offset, $limit );
my $lines = $sth->fetchall_arrayref;
my $json_text = to_json($lines);