mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-28 01:10:51 +01:00
Bugfix for new PMs
This commit is contained in:
parent
445427dd73
commit
2b2a8dca5f
@ -2325,8 +2325,9 @@ function mod_new_pm($username) {
|
|||||||
|
|
||||||
if ($row['boards'] === '*') {
|
if ($row['boards'] === '*') {
|
||||||
// If the global user PM'd them first within the last month, they can reply.
|
// If the global user PM'd them first within the last month, they can reply.
|
||||||
$check = prepare('SELECT * FROM ``pms`` WHERE FROM_UNIXTIME(`time`) < DATE_SUB(NOW(), INTERVAL 1 MONTH) AND `to` = :to');
|
$check = prepare('SELECT * FROM ``pms`` WHERE FROM_UNIXTIME(`time`) > DATE_SUB(NOW(), INTERVAL 1 MONTH) AND `sender` = :sender AND `to` = :to');
|
||||||
$check->bindValue(':to', $row['id']);
|
$check->bindValue(':sender', $row['id']);
|
||||||
|
$check->bindValue(':to', $mod['id']);
|
||||||
$check->execute() or error(db_error($check));
|
$check->execute() or error(db_error($check));
|
||||||
if (!$check->rowCount()) {
|
if (!$check->rowCount()) {
|
||||||
error(_('You may not PM a member of global staff who did not PM you within the last month. Try posting on /operate/ or emailing us instead: admin@8chan.co'));
|
error(_('You may not PM a member of global staff who did not PM you within the last month. Try posting on /operate/ or emailing us instead: admin@8chan.co'));
|
||||||
|
Loading…
Reference in New Issue
Block a user