Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0

Conflicts:
	htdocs/core/class/commonobject.class.php
This commit is contained in:
Laurent Destailleur 2018-09-16 12:54:39 +02:00
commit cc4fbfc3ef
3 changed files with 5 additions and 5 deletions

View File

@ -688,7 +688,7 @@ class AccountancyCategory // extends CommonObject
* Return list of personalized groups that are active * Return list of personalized groups that are active
* *
* @param int $categorytype -1=All, 0=Only non computed groups, 1=Only computed groups * @param int $categorytype -1=All, 0=Only non computed groups, 1=Only computed groups
* @return array Array of groups * @return array|int Array of groups or -1 if error
*/ */
public function getCats($categorytype=-1) public function getCats($categorytype=-1)
{ {
@ -745,7 +745,7 @@ class AccountancyCategory // extends CommonObject
* *
* @param int $cat_id Id if personalized accounting group/category * @param int $cat_id Id if personalized accounting group/category
* @param string $predefinedgroupwhere Sql criteria filter to select accounting accounts * @param string $predefinedgroupwhere Sql criteria filter to select accounting accounts
* @return array Array of accounting accounts * @return array|int Array of accounting accounts or -1 if error
*/ */
public function getCptsCat($cat_id, $predefinedgroupwhere='') public function getCptsCat($cat_id, $predefinedgroupwhere='')
{ {

View File

@ -1151,8 +1151,8 @@ abstract class CommonObject
$sql.= " ".MAIN_DB_PREFIX."c_type_contact as tc"; $sql.= " ".MAIN_DB_PREFIX."c_type_contact as tc";
$sql.= " WHERE ec.element_id = ".$id; $sql.= " WHERE ec.element_id = ".$id;
$sql.= " AND ec.fk_socpeople = c.rowid"; $sql.= " AND ec.fk_socpeople = c.rowid";
if ($source == 'internal') $sql.= " AND c.entity IN (0,".$conf->entity.")"; if ($source == 'internal') $sql.= " AND c.entity IN (".getEntity('user').")";
if ($source == 'external') $sql.= " AND c.entity IN (".getEntity('socpeople').")"; if ($source == 'external') $sql.= " AND c.entity IN (".getEntity('societe').")";
$sql.= " AND ec.fk_c_type_contact = tc.rowid"; $sql.= " AND ec.fk_c_type_contact = tc.rowid";
$sql.= " AND tc.element = '".$element."'"; $sql.= " AND tc.element = '".$element."'";
$sql.= " AND tc.source = '".$source."'"; $sql.= " AND tc.source = '".$source."'";

View File

@ -89,7 +89,7 @@ class modAgenda extends DolibarrModules
$resql = $this->db->query($sqlreadactions); $resql = $this->db->query($sqlreadactions);
if ($resql) if ($resql)
{ {
while ($obj = $this->db->fetch_object($sqlreadactions)) while ($obj = $this->db->fetch_object($resql))
{ {
//if (preg_match('/_CREATE$/',$obj->code) && (! in_array($obj->code, array('COMPANY_CREATE','PRODUCT_CREATE','TASK_CREATE')))) continue; // We don't track such events (*_CREATE) by default, we prefer validation (except thirdparty/product/task creation because there is no validation). //if (preg_match('/_CREATE$/',$obj->code) && (! in_array($obj->code, array('COMPANY_CREATE','PRODUCT_CREATE','TASK_CREATE')))) continue; // We don't track such events (*_CREATE) by default, we prefer validation (except thirdparty/product/task creation because there is no validation).
if (preg_match('/^TASK_/',$obj->code)) continue; // We don't track such events by default. if (preg_match('/^TASK_/',$obj->code)) continue; // We don't track such events by default.