This commit is contained in:
Claude 2012-09-01 12:47:38 +02:00
parent b278a65a7c
commit c47acdf705

View File

@ -427,7 +427,16 @@ class Pastes extends CI_Model
$this->db->select('SUM(spam_attempts) as sum'); $this->db->select('SUM(spam_attempts) as sum');
$query = $this->db->get('blocked_ips'); $query = $this->db->get('blocked_ips');
$q = $query->result_array(); $q = $query->result_array();
$data['total_spam_attempts'] = $q[0]['sum'];
if ($q[0]['sum'] != '')
{
$total_spam_attempts = $q[0]['sum'];
}
else
{
$total_spam_attempts = 0;
}
$data['total_spam_attempts'] = $total_spam_attempts;
//return //return
return $data; return $data;