Skip to content

Commit a8a14f7

Browse files
committed
! flip that so the tests pass
1 parent 95fdbac commit a8a14f7

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

sources/ElkArte/Controller/PersonalMessage.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -1144,10 +1144,9 @@ public function action_send2()
11441144

11451145
// Check whether we've gone over the limit of messages we can send per hour - fatal error if fails!
11461146
if (!empty($modSettings['pm_posts_per_hour'])
1147-
&& $this->user->mod_cache['bq'] === '0=1'
1148-
&& $this->user->mod_cache['gq'] === '0=1'
11491147
&& !allowedTo(array('admin_forum', 'moderate_forum', 'send_mail'))
1150-
)
1148+
&& $this->user->mod_cache['bq'] === '0=1'
1149+
&& $this->user->mod_cache['gq'] === '0=1')
11511150
{
11521151
// How many have they sent this last hour?
11531152
$pmCount = pmCount($this->user->id, 3600);

tests/ElkArte/Controller/PersonalMessageTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function testActionIndexPM()
6363

6464
public function testActionSendPM()
6565
{
66-
global $context;
66+
global $context, $modSettings;
6767

6868
$req = HttpReq::instance();
6969
$req->query->sa = 'send';
@@ -80,7 +80,7 @@ public function testActionSendPM()
8080
$this->assertEquals('', $context['subject']);
8181

8282
// Lets try and send it now
83-
$modSettings['pm_spam_settings'] = [100, 100, 0];
83+
$modSettings['pm_spam_settings'] = "100, 100, 0";
8484
$req->query->sa = 'send2';
8585
$req->post->subject = 'Yo';
8686
$req->post->message = 'This is for you, ok, have a great day';

0 commit comments

Comments
 (0)