Compare commits

..

5 Commits
2.0.1 ... 2.0.2

Author SHA1 Message Date
Michael Kaufmann
fb7d65d645 need pagination-context for sortfields; only disable pagination-code on view
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 19:01:10 +01:00
Michael Kaufmann
3b9c60e985 fix pagination when pagination is diabled (entries per page = 0)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 18:52:58 +01:00
Michael Kaufmann
452df60866 set version to 2.0.2
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 17:58:42 +01:00
Michael Kaufmann
7ce7123756 fix sql text defaults in updater
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 17:34:58 +01:00
Michael Kaufmann
d42072e3ad re-enable/fix sortable tablelisting flag
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 17:25:19 +01:00
6 changed files with 18 additions and 11 deletions

View File

@@ -696,7 +696,7 @@ opcache.validate_timestamps'),
('system', 'distribution', ''), ('system', 'distribution', ''),
('system', 'update_channel', 'stable'), ('system', 'update_channel', 'stable'),
('system', 'updatecheck_data', ''), ('system', 'updatecheck_data', ''),
('system', 'update_notify_last', '2.0.1'), ('system', 'update_notify_last', '2.0.2'),
('system', 'traffictool', 'goaccess'), ('system', 'traffictool', 'goaccess'),
('api', 'enabled', '0'), ('api', 'enabled', '0'),
('2fa', 'enabled', '1'), ('2fa', 'enabled', '1'),
@@ -740,7 +740,7 @@ opcache.validate_timestamps'),
('panel', 'logo_overridetheme', '0'), ('panel', 'logo_overridetheme', '0'),
('panel', 'logo_overridecustom', '0'), ('panel', 'logo_overridecustom', '0'),
('panel', 'settings_mode', '0'), ('panel', 'settings_mode', '0'),
('panel', 'version', '2.0.1'), ('panel', 'version', '2.0.2'),
('panel', 'db_version', '202212060'); ('panel', 'db_version', '202212060');

View File

@@ -67,8 +67,8 @@ if (Froxlor::isFroxlorVersion('0.10.38.3')) {
) ENGINE=InnoDB CHARSET=utf8 COLLATE=utf8_general_ci;"; ) ENGINE=InnoDB CHARSET=utf8 COLLATE=utf8_general_ci;";
Database::query($sql); Database::query($sql);
// new customer allowed_mysqlserver field // new customer allowed_mysqlserver field
Database::query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `allowed_mysqlserver` text NOT NULL default '[0]';"); Database::query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `allowed_mysqlserver` text NOT NULL;");
Database::query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` CHANGE COLUMN `allowed_phpconfigs` `allowed_phpconfigs` text NOT NULL default '';"); Database::query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` CHANGE COLUMN `allowed_phpconfigs` `allowed_phpconfigs` text NOT NULL;");
Database::query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` CHANGE COLUMN `customernumber` `customernumber` varchar(100) NOT NULL default '';"); Database::query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` CHANGE COLUMN `customernumber` `customernumber` varchar(100) NOT NULL default '';");
$has_customer_table_update_200 = true; $has_customer_table_update_200 = true;
// ftp_users adjustments // ftp_users adjustments
@@ -240,3 +240,8 @@ if (Froxlor::isFroxlorVersion('2.0.0')) {
Froxlor::updateToVersion('2.0.1'); Froxlor::updateToVersion('2.0.1');
} }
if (Froxlor::isFroxlorVersion('2.0.1')) {
Update::showUpdateStep("Updating from 2.0.1 to 2.0.2", false);
Froxlor::updateToVersion('2.0.2');
}

View File

@@ -31,7 +31,7 @@ final class Froxlor
{ {
// Main version variable // Main version variable
const VERSION = '2.0.1'; const VERSION = '2.0.2';
// Database version (YYYYMMDDC where C is a daily counter) // Database version (YYYYMMDDC where C is a daily counter)
const DBVERSION = '202212060'; const DBVERSION = '202212060';

View File

@@ -113,17 +113,15 @@ class Collection
public function withPagination(array $columns, array $default_sorting = []): Collection public function withPagination(array $columns, array $default_sorting = []): Collection
{ {
// Get only searchable columns // Get only searchable columns
/*
$sortableColumns = []; $sortableColumns = [];
foreach ($columns as $key => $column) { foreach ($columns as $key => $column) {
if (isset($column['sortable']) && $column['sortable']) { if (!isset($column['sortable']) || (isset($column['sortable']) && $column['sortable'])) {
$sortableColumns[$key] = $column; $sortableColumns[$key] = $column;
} }
} }
*/
// Prepare pagination // Prepare pagination
$this->pagination = new Pagination($columns, $this->count(), (int)Settings::Get('panel.paging'), $default_sorting); $this->pagination = new Pagination($sortableColumns, $this->count(), (int)Settings::Get('panel.paging'), $default_sorting);
$this->params = array_merge($this->params, $this->pagination->getApiCommandParams()); $this->params = array_merge($this->params, $this->pagination->getApiCommandParams());
return $this; return $this;

View File

@@ -63,7 +63,9 @@ class Pagination
$this->perPage = $perPage; $this->perPage = $perPage;
$this->pageno = 1; $this->pageno = 1;
// add default limitation by settings // add default limitation by settings
$this->addLimit(Settings::Get('panel.paging')); if (Settings::Get('panel.paging') > 0) {
$this->addLimit(Settings::Get('panel.paging'));
}
// check search request // check search request
$this->searchtext = ''; $this->searchtext = '';
if (count($fields) > 0) { if (count($fields) > 0) {
@@ -205,7 +207,7 @@ class Pagination
"total" => $this->entries, "total" => $this->entries,
"per_page" => $this->perPage, "per_page" => $this->perPage,
"current_page" => $this->pageno, "current_page" => $this->pageno,
"last_page" => ceil($this->entries / $this->perPage), "last_page" => (Settings::Get('panel.paging') > 0) ? ceil($this->entries / $this->perPage) : -1,
"from" => $this->data['sql_offset'] ?? null, "from" => $this->data['sql_offset'] ?? null,
"to" => min($this->data['sql_offset'] + $this->perPage, $this->entries), "to" => min($this->data['sql_offset'] + $this->perPage, $this->entries),
'sortfields' => array_keys($this->fields), 'sortfields' => array_keys($this->fields),

View File

@@ -54,11 +54,13 @@ return [
'label' => lng('ssl_certificates.valid_from'), 'label' => lng('ssl_certificates.valid_from'),
'field' => 'validfromdate', 'field' => 'validfromdate',
'searchable' => false, 'searchable' => false,
'sortable' => false,
], ],
'c.validtodate' => [ 'c.validtodate' => [
'label' => lng('ssl_certificates.valid_until'), 'label' => lng('ssl_certificates.valid_until'),
'field' => 'validtodate', 'field' => 'validtodate',
'searchable' => false, 'searchable' => false,
'sortable' => false,
], ],
], ],
'visible_columns' => Listing::getVisibleColumnsForListing('sslcertificates_list', [ 'visible_columns' => Listing::getVisibleColumnsForListing('sslcertificates_list', [