accounting fix

This commit is contained in:
SJ 2013-07-12 15:03:34 +02:00
parent e7c26dbcc7
commit 5c4ff2844f

View File

@ -77,7 +77,7 @@ class ModelAccountingAccounting extends Model
$parts = explode('@',$username); $parts = explode('@',$username);
if ( isset($accepteddomains[ $parts[1] ]) ) { if ( isset($parts[1]) && isset($accepteddomains[ $parts[1] ]) ) {
$addusers = $this->db->query("INSERT INTO " . TABLE_STAT_COUNTER . " (`date`,`email`,`domain`,`sent`,`recd`,`sentsize`,`recdsize`) VALUES($date,'$username','".$parts[1]."',$sent,$recd,$sizesent,$sizerecd);"); $addusers = $this->db->query("INSERT INTO " . TABLE_STAT_COUNTER . " (`date`,`email`,`domain`,`sent`,`recd`,`sentsize`,`recdsize`) VALUES($date,'$username','".$parts[1]."',$sent,$recd,$sizesent,$sizerecd);");
$return['addedstats'] = $return['addedstats'] + $this->db->countAffected(); $return['addedstats'] = $return['addedstats'] + $this->db->countAffected();
} }