Difference between revisions of "Informations for developpers of complementary modules"

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
(examples for migration)
Tag: 2017 source edit
 
Tag: 2017 source edit
Line 3: Line 3:
 
In that wiki you will find more informations and details about some points. Each developper is invited to contribute on this page with some examples or "good tips" about it.
 
In that wiki you will find more informations and details about some points. Each developper is invited to contribute on this page with some examples or "good tips" about it.
  
=== dolibarr 20 ===
+
* [[dolibarr 20.0]]
 
+
* dolibarr 19.0
==== fetchAll and sqlfilters ====
 
 
 
* The parameter $filter of method fetchAll does not accept array of SQL but must be a string of an Universal Search Filter syntax.
 
 
 
Old code:
 
 
$SkillrecordsForActiveUser = $sk->fetchAll('ASC', 'fk_skill', 0, 0, array("customsql"=>"fk_object = ".$object->fk_user ." AND objecttype ='".SkillRank::SKILLRANK_TYPE_USER."'"), 'AND');
 
 
 
New code will become
 
 
 
$SkillrecordsForActiveUser = $sk->fetchAll('ASC', 'fk_skill', 0, 0, "(fk_object:=:".((int) $object->fk_user).") AND (objecttype:=:'".$db->escape(SkillRank::SKILLRANK_TYPE_USER)."')", 'AND');
 
 
 
 
 
* Thanks to fred, other warning about "$db->getRows($sql)"
 
 
 
 
 
=== dolibarr 19 ===
 

Revision as of 23:13, 8 June 2024

Developpers of third part modules MUST consult official dolibarr ChangeLog (section For developers or integrators) and the most important part "WARNING" section.

In that wiki you will find more informations and details about some points. Each developper is invited to contribute on this page with some examples or "good tips" about it.