Fix: Error when using iphone

This commit is contained in:
Laurent Destailleur 2010-04-12 00:27:14 +00:00
parent ea40998528
commit 47ff342fa4
4 changed files with 6 additions and 3 deletions

View File

@ -40,6 +40,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

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -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'],250)."'":'NULL').",";
$sql.= " ".$this->db->idate($this->dateevent).",";
$sql.= " ".($user->id?"'".$user->id."'":'NULL').",";
$sql.= " '".addslashes($this->description)."'";

View File

@ -198,3 +198,5 @@ ALTER TABLE llx_element_milestone ADD CONSTRAINT fk_element_milestone_fk_milesto
ALTER TABLE llx_deplacement ADD COLUMN fk_statut INTEGER DEFAULT 1 NOT NULL after type;
drop table llx_appro;
ALTER TABLE llx_events MODIFY COLUMN user_agent varchar(255) NULL;

View File

@ -33,7 +33,7 @@ create table llx_events
fk_user integer, -- id user
description varchar(250) NOT NULL, -- full description of action
ip varchar(32) NOT NULL, -- ip
user_agent varchar(128) NULL, -- user agent
user_agent varchar(255) NULL, -- user agent
fk_object integer -- id of related object
) type=innodb;