2
0
forked from Wavyzz/dolibarr

[ bug #40 ] Export de donnes dangereux

This commit is contained in:
Laurent Destailleur
2012-07-27 16:03:20 +02:00
parent 723df0dd43
commit 0b048ebb94
10 changed files with 32 additions and 7 deletions

View File

@@ -123,6 +123,7 @@ class modDeplacement extends DolibarrModules
$this->export_permission[$r]=array(array("deplacement","export"));
$this->export_fields_array[$r]=array('u.login'=>'Login','u.name'=>'Lastname','u.firstname'=>'Firstname','d.rowid'=>"TripId",'d.type'=>"Type",'d.km'=>"FeesKilometersOrAmout",'d.dated'=>"Date",'d.note'=>'NotePrivate','d.note_public'=>'NotePublic','s.nom'=>'ThirdParty');
$this->export_entities_array[$r]=array('u.login'=>'user','u.name'=>'user','u.firstname'=>'user','d.rowid'=>"trip",'d.type'=>"trip",'d.km'=>"trip",'d.dated'=>"trip",'d.note'=>'trip','d.note_public'=>'trip','s.nom'=>'company');
$this->export_dependencies_array[$r]=array('trip'=>'d.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
$this->export_sql_start[$r]='SELECT DISTINCT ';
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'user as u';