Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1154 enhancement apiv2 return total amount of pages for paginated api calls #1173

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fixed bug in upgrade script
  • Loading branch information
jessevz committed Jan 9, 2025
commit 2f5c932df47e6650f3cbadce143c9f2f01ffda25
19 changes: 14 additions & 5 deletions src/install/updates/update_v0.14.3_v0.14.x.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
<?php /** @noinspection SqlNoDataSourceInspection */

use DBA\Config;
use DBA\Factory;
use DBA\QueryFilter;

if (!isset($PRESENT["v0.14.x_pagination"])) {
Factory::getAgentFactory()->getDB()->query("INSERT INTO `Config` (`configId`, `configSectionId`, `item`, `value`) VALUES
(78, 3, 'defaultPageSize', '10000');");
Factory::getAgentFactory()->getDB()->query("INSERT INTO `Config` (`configId`, `configSectionId`, `item`, `value`) VALUES
(79, 3, 'maxPageSize', '50000');");
$EXECUTED["v0.14.x_pagination"];
$qF = new QueryFilter(Config::ITEM, DConfig::DEFAULT_PAGE_SIZE, "=");
$item = Factory::getConfigFactory()->filter([Factory::FILTER => $qF], true);
if (!$item) {
$config = new Config(null, 3, DConfig::DEFAULT_PAGE_SIZE, '10000');
Factory::getConfigFactory()->save($config);
}
$qF = new QueryFilter(Config::ITEM, DConfig::MAX_PAGE_SIZE, "=");
$item = Factory::getConfigFactory()->filter([Factory::FILTER => $qF], true);
if (!$item) {
$config = new Config(null, 3, DConfig::MAX_PAGE_SIZE, '50000');
Factory::getConfigFactory()->save($config);
}
}
Loading