Skip to content

Commit 7f78390

Browse files
committed
Jet Core - bug fixes
------------------------- * Jet\Data_DateTime::catchDateTime, Data_DateTime::catchDate: 0000-00-00 00:00:00 or 0000-00-00 means null * Jet\Data_Paginator->getItemsPerPage(): int method added * Jet\DataListing_Column->getExportData( ) now may returns also object * Jet\Db_Backend_PDO_Config_pgsql: methods getSslMode, setSslMode added * Jet\Db_Backend_PDO_Config_sqlsrv: MultipleActiveResultSets default config value added
1 parent cab6a00 commit 7f78390

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

library/Jet/Data/DateTime.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public static function catchDateTime( Data_DateTime|string|null $value ) : ?stat
3333
{
3434
if(
3535
$value==='' ||
36+
$value==='0000-00-00 00:00:00' ||
37+
$value==='0000-00-00' ||
3638
$value===null
3739
) {
3840
return null;
@@ -56,6 +58,8 @@ public static function catchDate( Data_DateTime|string|null $value ) : ?static
5658
{
5759
if(
5860
$value==='' ||
61+
$value==='0000-00-00 00:00:00' ||
62+
$value==='0000-00-00' ||
5963
$value===null
6064
) {
6165
return null;

library/Jet/Data/Paginator.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,13 @@ public function getData(): iterable
264264

265265
return $result;
266266
}
267+
268+
public function getItemsPerPage(): int
269+
{
270+
return $this->items_per_page;
271+
}
272+
273+
267274

268275
/**
269276
*

library/Jet/DataListing/Column.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function getExportHeader() : null|string|array
9494
return null;
9595
}
9696

97-
public function getExportData( mixed $item ) : float|int|bool|string|array
97+
public function getExportData( mixed $item ) : float|int|bool|string|array|object
9898
{
9999
return '';
100100
}

library/Jet/Db/Backend/PDO/Config/pgsql.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,6 @@ trait Db_Backend_PDO_Config_pgsql
2525
)]
2626
protected string $ssl_mode = '';
2727

28-
public function getSslMode(): string
29-
{
30-
return $this->ssl_mode;
31-
}
32-
33-
public function setSslMode( string $ssl_mode ): void
34-
{
35-
$this->ssl_mode = $ssl_mode;
36-
}
37-
3828

3929
protected function pgsql_getDnsEntries(): array
4030
{

library/Jet/Db/Backend/PDO/Config/sqlsrv.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ protected function sqlsrv_getDnsEntries(): array
1919
'Server' => $this->host.','.$this->port,
2020
'Database' => $this->dbname,
2121
'TrustServerCertificate' => 'yes',
22+
'MultipleActiveResultSets' => 'False',
2223
];
2324
}
2425

0 commit comments

Comments
 (0)