Skip to content

Conversation

Shaswat975
Copy link
Collaborator

#89

@Shaswat975 Shaswat975 requested a review from hakasapl May 31, 2024 14:06
@@ -156,7 +157,7 @@ CREATE TABLE `notices` (

INSERT INTO `notices` (`id`, `date`, `title`, `message`) VALUES

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't there be an 'expiry' here?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this new directory meant to be here?

@@ -17,6 +17,10 @@

$notices = $SQL->getNotices();
foreach ($notices as $notice) {
if ($notice["expiry"] < date('Y-m-d')) {
$SQL->deleteNotice($notice["id"]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing the deletion here causes a race condition if two page loads happen at the same time and so try to delete the same items. This will cause it to throw an exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants