Fix: Error when using iphone

This commit is contained in:
Laurent Destailleur 2010-04-12 00:27:56 +00:00
parent fb254a1dd4
commit c7b125120e
2 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ For users:
- Fix: Broken feature in trips and expense module.
- Fix: Can use $ in database and login/pass values.
- Fix: No error on upgrade if there is orphelins tasks.
- Fix: Failed to login when user agent string was longer than 128.
***** ChangeLog for 2.8 compared to 2.7 *****

View File

@ -95,7 +95,7 @@ class Events // extends CommonObject
$sql.= " '".$this->type."',";
$sql.= " ".$conf->entity.",";
$sql.= " '".$_SERVER['REMOTE_ADDR']."',";
$sql.= " ".($_SERVER['HTTP_USER_AGENT']?"'".$_SERVER['HTTP_USER_AGENT']."'":'NULL').",";
$sql.= " ".($_SERVER['HTTP_USER_AGENT']?"'".dol_trunc($_SERVER['HTTP_USER_AGENT'],120)."'":'NULL').",";
$sql.= " ".$this->db->idate($this->dateevent).",";
$sql.= " ".($user->id?"'".$user->id."'":'NULL').",";
$sql.= " '".addslashes($this->description)."'";