File tree 3 files changed +8
-6
lines changed
3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -57,10 +57,7 @@ public function getNbResults(): int
57
57
*/
58
58
public function getSlice (int $ offset , int $ length ): iterable
59
59
{
60
- $ sql = 'SELECT *, i.id, r.id, s.id FROM ( ' . $ this ->getConversationsQuery () . ') m ' ;
61
- $ sql .= ' JOIN members i ON m.initiator_id = i.id ' ;
62
- $ sql .= ' JOIN members r ON m.IdReceiver = r.id ' ;
63
- $ sql .= ' JOIN members s ON m.IdSender = s.id ' ;
60
+ $ sql = 'SELECT * FROM ( ' . $ this ->getConversationsQuery () . ') m ' ;
64
61
$ sql .= ' ORDER BY `m`.`created` DESC LIMIT ' . $ length . ' OFFSET ' . $ offset ;
65
62
66
63
$ query = $ this ->entityManager ->createNativeQuery ($ sql , new MessageResultSetMapping ())
@@ -124,7 +121,7 @@ protected function getInitiatorCondition(): string
124
121
125
122
protected function getNotSpamCondition (): string
126
123
{
127
- return '(m.initiator_id <> :memberId AND InFolder <> \'' . InFolderType::SPAM . '\') ' ;
124
+ return '(m.initiator_id = :memberId or InFolder <> \'' . InFolderType::SPAM . '\') ' ;
128
125
}
129
126
130
127
abstract protected function getConversationsQuery (): string ;
Original file line number Diff line number Diff line change @@ -42,6 +42,6 @@ protected function getConversationsQuery(): string
42
42
43
43
private function getSpamCondition (): string
44
44
{
45
- return '(SpamInfo LIKE \'% ' . SpamInfoType::MEMBER_SAYS_SPAM . '% \'SpamInfo LIKE \'% ' . SpamInfoType::SPAM_BLOCKED_WORD . '% \') OR AND InFolder = \'' . InFolderType::SPAM . '\'' ;
45
+ return '(SpamInfo LIKE \'% ' . SpamInfoType::MEMBER_SAYS_SPAM . '% \' OR SpamInfo LIKE \'% ' . SpamInfoType::SPAM_BLOCKED_WORD . '% \') AND InFolder = \'' . InFolderType::SPAM . '\'' ;
46
46
}
47
47
}
Original file line number Diff line number Diff line change 37
37
<div class =" float-left" >
38
38
{{ pagerfanta( reported , ' rox_default' ) }}
39
39
</div >
40
+ <div class =" row" >
41
+ <div class =" col-12 text-right" >
42
+ <button type =" submit" class =" btn btn-primary" >{{ ' button.update' | trans }}</button >
43
+ </div >
44
+ </div >
40
45
{% endif %}
41
46
<table class =" table table-striped table-hover" >
42
47
You can’t perform that action at this time.
0 commit comments