Skip to content

Commit

Permalink
GH-126 Code style simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
mdziekon committed Aug 1, 2020
1 parent 7c10df7 commit 0d1065e
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,12 +413,12 @@
} else {
$DelNotifs[] = $_Lang['Delete_NoMsgsToDelete'];
}
}
elseif($DeleteWhat == 'deleteallcat')
{
// User is Deleting all messages in this category at once
if(in_array($_ThisCategory, $MessageType) AND $_ThisCategory != 100 AND $_ThisCategory != 80)
{
} elseif ($DeleteWhat == 'deleteallcat') {
if (
in_array($_ThisCategory, $MessageType) &&
$_ThisCategory != 100 &&
$_ThisCategory != 80
) {
$cmdResult = Messages\Commands\batchDeleteUserMessages([
'userID' => $_User['id'],
'messageTypeID' => $_ThisCategory,
Expand All @@ -430,18 +430,12 @@
} else {
$DelNotifs[] = $_Lang['Delete_NoMsgsToDelete'];
}
}
else
{
if($_ThisCategory == 80)
{
// Don't let to delete all AdminMessages
$DelNotifs[] = $_Lang['Delete_CannotDeleteAdminMsgsAtOnce'];
}
else
{
$DelNotifs[] = $_Lang['Delete_BadCatSelected'];
}
} else {
$DelNotifs[] = (
$_ThisCategory == 80 ?
$_Lang['Delete_CannotDeleteAdminMsgsAtOnce'] :
$_Lang['Delete_BadCatSelected']
);
}
}
else if($DeleteWhat == 'deletemarked')
Expand Down

0 comments on commit 0d1065e

Please sign in to comment.