diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index f622f07d..b1bf1148 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -830,6 +830,13 @@ class Admin_DataController extends Zend_Controller_Action { $sql="insert into responsible (individual,organisation,position,delivery,phone,email,city,country,administrative,postal) values(?,?,?,?,?,?,?,?,?,?)"; $this->db->query($sql,array($ind,$au['organisation'],$au['position'],$au['delivery'],$au['phone'],$au['email'],$au['city'],$au['country'],$au['administrative'],$au['postal'])); + } else { + //deal email address + if (($au['email']) && empty($row->email)) + { + $sql="update responsible set email=? where id=?"; + $this->db->query($sql,array($au['email'],$row->id)); + } } $sql="select id from responsible where individual=? and organisation=?"; $row=$this->db->fetchRow($sql,array($ind,$au['organisation']));