Skip to content

Commit

Permalink
Merge pull request #830 from hhunderter/Version-2.1.54-Beta
Browse files Browse the repository at this point in the history
Version 2.1.54
  • Loading branch information
hhunderter authored Oct 29, 2023
2 parents b7d1c48 + 64df30c commit d32882d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
6 changes: 5 additions & 1 deletion application/modules/forum/controllers/admin/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public function indexAction()
'title' => 'required',
'readAccess' => 'min:0',
'replyAccess' => 'min:0',
'createAccess' => 'min:0',
]);
if (!$validation->isValid()) {
$this->addMessage($validation->getErrorBag()->getErrorMessages(), 'danger', true);
Expand All @@ -83,7 +84,10 @@ public function indexAction()

// Deletes old entries from database.
if (!empty($oldItems)) {
$forumMapper->deleteItems(array_diff($oldItems, array_keys($items)));
$itemsToDelete = array_diff($oldItems, array_keys($items));
if (!empty($itemsToDelete)) {
$forumMapper->deleteItems($itemsToDelete);
}
}

if ($items) {
Expand Down
4 changes: 4 additions & 0 deletions application/modules/forum/mappers/Forum.php
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,10 @@ public function deleteItem(int $id)
*/
public function deleteItems(array $ids)
{
if (empty($ids)) {
return;
}

$this->db()->delete('forum_items')
->where(['id' => $ids])
->execute();
Expand Down
2 changes: 1 addition & 1 deletion application/modules/guestbook/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Config extends \Ilch\Config\Install
{
public $config = [
'key' => 'guestbook',
'version' => '1.13.0',
'version' => '1.13.1',
'icon_small' => 'fa-solid fa-book',
'author' => 'Stantin, Thomas',
'link' => 'https://ilch.de',
Expand Down
20 changes: 10 additions & 10 deletions application/modules/guestbook/models/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,49 +70,49 @@ public function getId(): ?int
/**
* Gets the email of the entry.
*
* @return string
* @return string|null
*/
public function getEmail(): string
public function getEmail(): ?string
{
return $this->email;
}

/**
* Gets the text of the entry.
*
* @return string
* @return string|null
*/
public function getText(): string
public function getText(): ?string
{
return $this->text;
}

/**
* Gets the name of the entry.
*
* @return string
* @return string|null
*/
public function getName(): string
public function getName(): ?string
{
return $this->name;
}

/**
* Gets the homepage of the entry.
*
* @return string
* @return string|null
*/
public function getHomepage(): string
public function getHomepage(): ?string
{
return $this->homepage;
}

/**
* Gets the datetime of the entry.
*
* @return string
* @return string|null
*/
public function getDatetime(): string
public function getDatetime(): ?string
{
return $this->datetime;
}
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
$serverTimeZone = @date_default_timezone_get();
date_default_timezone_set('UTC');

define('VERSION', '2.1.53');
define('VERSION', '2.1.54');
define('SERVER_TIMEZONE', $serverTimeZone);
define('DEFAULT_MODULE', 'page');
define('DEFAULT_LAYOUT', 'index');
Expand Down

0 comments on commit d32882d

Please sign in to comment.