private function log_action($name_, $info_ = array()) { $where = $_SERVER['REMOTE_ADDR']; $headers = apache_request_headers(); foreach ($headers as $k => $v) { // Internet explorer send http headers in lower cases... $k = strtolower($k); if ($k == 'x-forwarded-for') { $where = $v; } } $a = new AdminAction(null, $this->user_login, $name_, $where); $a->infos = $info_; Abstract_AdminAction::save($a); }