Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
EsdrasCaleb committed Jan 24, 2024
1 parent c27aaa2 commit e53e228
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions classes/task/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function execute() {
$users = null;
$whereaction = "WHERE uad.id is null";

if($configs->harddelete) {
if ($configs->harddelete) {
$whereaction = "";
}
if ($configs->deletereadmessages > 0) {
Expand All @@ -74,9 +74,9 @@ public function execute() {
LEFT JOIN {message_user_actions} uad on uad.messageid=m.id and uad.action=?
{$whereaction}";
$readmessagens = $DB->get_records_sql($sql, [$individualmessage, $reftime, $viewaction, $reftime,
$user->userid, $delteaction,]);
$user->userid, $delteaction, ]);
foreach ($readmessagens as $readmessage) {
if($configs->harddelete) {
if ($configs->harddelete) {
\core_message\api::delete_message($readmessage->userid, $readmessage->messageid);
}
}
Expand All @@ -95,7 +95,7 @@ public function execute() {
LEFT JOIN {message_user_actions} uad on uad.messageid=m.id and uad.action=?
{$whereaction}";
$readmessagens = $DB->get_records_sql($sql, [$individualmessage, $reftime, $user->userid,
$delteaction,]);
$delteaction, ]);
foreach ($readmessagens as $readmessage) {
if ($configs->harddelete) {
hard_delete_message($readmessage->messageid);
Expand All @@ -113,7 +113,7 @@ public function execute() {
and ua.action=?
GROUP BY c.id
HAVING count(ua.id) >=2*count(DISTINCT m.id)";
$deletedconversation = $DB->get_records_sql($sql, array($individualmessage, $delteaction));
$deletedconversation = $DB->get_records_sql($sql, [$individualmessage, $delteaction, ]);
foreach ($deletedconversation as $conversation) {
\core_message\api::delete_all_conversation_data($conversation->id);
}
Expand Down

0 comments on commit e53e228

Please sign in to comment.