added a safeguard to the "not spam" feature

This commit is contained in:
SJ 2014-01-16 12:59:56 +01:00
parent 4b08cc3f96
commit df2d7aa644

View File

@ -713,7 +713,7 @@ class ModelSearchMessage extends Model {
public function is_message_spam($id = 0) { public function is_message_spam($id = 0) {
$spam = 0; $spam = 0;
if($id > 0) { if($id > 0 && DEFAULT_RETENTION > 30) {
$query = $this->db->query("SELECT spam FROM " . TABLE_META . " WHERE id=?", array($id)); $query = $this->db->query("SELECT spam FROM " . TABLE_META . " WHERE id=?", array($id));
if(isset($query->row['spam'])) { $spam = $query->row['spam']; } if(isset($query->row['spam'])) { $spam = $query->row['spam']; }