Skip to content

Commit

Permalink
Version 0.15.1 (#190)
Browse files Browse the repository at this point in the history
* feat: component filter added (#176)

* fix: only add column when it doesn't exist (#167)

* fix: only add column when it doesn't exist

* style: formatting

* feat: export cms (#169)

* feat: import export

* feat: use file instead of database

* feat: move import/export to model

* fix: export from tableitem

* feat: move export to Trait

* style: formatting

* style: formatting

* fix: never use file as source of truth

* style: formatting

* chore: cleanup

* fix: use export to file

* feat: comment things that no longer work

* feat: add  meta data

* feat: list filenames

* feat: cleaner export

* feat: remove UI for import/export

* style: formatting

* feat: add import command

* feat: import from files

* feat: remove import UI

* feat: prevent editing tables with changes on disk

* feat: do not use id's in export for tables

* feat: optionally export ids

* feat: import ids when available

---------

Co-authored-by: Rene <[email protected]>

* feat: component filter added

* feat: added filterparams

* feat: only query if filter exists

* feat: WIP

* feat: typed editor classes

* feat: editor changes

* feat: removed code

* feat: removed request from editor and overview

* feat: added TODO

* chore: update dependency

* feat: migration for model column in cms_table

* fix: retain model on import export cms_table

* feat: moved code to component

* feat: added guards

* style: formatting

* feat: parameters now in tableservice

* feat: removed parameter

* feat: removed request() from editor

* fix: return empty array if key not exists

* style: formatting

* style: formatting

---------

Co-authored-by: René <[email protected]>

* fix: exceptions handling (#189)

* fix: exception handling

* style: formatting

* fix: return type

* feat: date helper (#191)

---------

Co-authored-by: Xander Schuurman <[email protected]>
  • Loading branch information
64knl and keeama13 authored Jan 31, 2024
1 parent 9c69fab commit 166ae92
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
24 changes: 14 additions & 10 deletions src/Helpers/SitebossHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ public static function config(string $code, bool $failOnMissing = true): string|
return self::$config[$code]['value'];
}

public static function mail(string $to_name, string $to_email, string $subject, $html, $data = false)
public static function mail(string $to_name, string $to_email, string $subject, $html, $data = false): ?int
{
trigger_error('Method '.__METHOD__.' is deprecated', E_USER_DEPRECATED);
$sendgrid_api_key = self::config('sendgrid_api_key', true);
$sendgrid_sender_email = self::config('sendgrid_sender_email', true);
$sendgrid_sender_name = self::config('sendgrid_sender_name', true);
Expand All @@ -60,22 +61,16 @@ public static function mail(string $to_name, string $to_email, string $subject,
}
}

// if ($data != false) {
// // HTML is a Twig template with data
// if(!site::$page->twig)
// {
// site::$page->getTwig();
// }
// $html = site::$page->twig->render($html, $data);
// }
$email->addContent('text/html', $html);
$sendgrid = new \SendGrid($sendgrid_api_key);
try {
$response = $sendgrid->send($email);

return $response->statusCode();
} catch (\Exception $e) {
echo 'Caught exception: '.$e->getMessage()."\n";
Log::error('Caught exception: '.$e->getMessage());

return null;
}
}

Expand Down Expand Up @@ -117,4 +112,13 @@ public static function makeDirectory($root, $dir): bool

return true;
}

public static function formatDate($date): string
{
if (is_null($date)) {
return '-';
}

return date('d-m-Y H:i:s', strtotime($date));
}
}
2 changes: 1 addition & 1 deletion src/Services/ClamAV/ClamAV.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private static function getClamAVSocket(): string
$unixSocket = config('clamav.unix_socket');

return 'unix://'.$unixSocket;
} else {
} elseif ($preferredSocket === 'tcp') {
$tcpSocket = config('clamav.tcp_socket');

return $tcpSocket;
Expand Down

0 comments on commit 166ae92

Please sign in to comment.