Skip to content

Commit 107a0e3

Browse files
authored
[5.0] Fix wrong language string constant used in database query of privacyconsent task scheduler plugin (#41597)
* Use right language string constant for db query * Remove obsolete and never released language string
1 parent 0475f8e commit 107a0e3

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

administrator/language/en-GB/plg_task_privacyconsent.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,4 @@ PLG_TASK_PRIVACYCONSENT_REDIRECT_MESSAGE_DESC="Custom message to be displayed on
4343
PLG_TASK_PRIVACYCONSENT_REDIRECT_MESSAGE_LABEL="Redirect Message"
4444
PLG_TASK_PRIVACYCONSENT_REMINDBEFORE_DESC="Number of days to send a reminder before the expiration of the privacy consent."
4545
PLG_TASK_PRIVACYCONSENT_REMINDBEFORE_LABEL="Remind"
46-
PLG_TASK_PRIVACYCONSENT_SUBJECT="Privacy Policy"
4746
PLG_TASK_PRIVACYCONSENT_XML_DESCRIPTION="Task for remind expired consents and delete expired consents"

plugins/task/privacyconsent/src/Extension/PrivacyConsent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private function remindExpiringConsents($expire, $remind): int
127127
$query->select($db->quoteName(['r.id', 'r.user_id', 'u.email']))
128128
->from($db->quoteName('#__privacy_consents', 'r'))
129129
->join('LEFT', $db->quoteName('#__users', 'u'), $db->quoteName('u.id') . ' = ' . $db->quoteName('r.user_id'))
130-
->where($db->quoteName('subject') . ' = ' . $db->quote('PLG_TASK_PRIVACYCONSENT_SUBJECT'))
130+
->where($db->quoteName('subject') . ' = ' . $db->quote('PLG_SYSTEM_PRIVACYCONSENT_SUBJECT'))
131131
->where($db->quoteName('remind') . ' = 0')
132132
->where($query->dateAdd($db->quote($now), $period, 'DAY') . ' > ' . $db->quoteName('created'));
133133

@@ -215,7 +215,7 @@ private function invalidateExpiredConsents($expire): int
215215
$query->select($db->quoteName(['id', 'user_id']))
216216
->from($db->quoteName('#__privacy_consents'))
217217
->where($query->dateAdd($db->quote($now), $period, 'DAY') . ' > ' . $db->quoteName('created'))
218-
->where($db->quoteName('subject') . ' = ' . $db->quote('PLG_TASK_PRIVACYCONSENT_SUBJECT'))
218+
->where($db->quoteName('subject') . ' = ' . $db->quote('PLG_SYSTEM_PRIVACYCONSENT_SUBJECT'))
219219
->where($db->quoteName('state') . ' = 1');
220220

221221
$db->setQuery($query);

0 commit comments

Comments
 (0)