mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix: not defined value
This commit is contained in:
parent
94b6defd8c
commit
e2b8ad2035
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (c) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (c) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (c) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (c) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
|
|
@ -28,8 +28,7 @@ if (! empty($conf->ldap->enabled)) require_once (DOL_DOCUMENT_ROOT."/core/class/
|
|||
|
||||
|
||||
/**
|
||||
* \class UserGroup
|
||||
* \brief Class to manage user groups
|
||||
* Class to manage user groups
|
||||
*/
|
||||
class UserGroup extends CommonObject
|
||||
{
|
||||
|
|
@ -573,11 +572,10 @@ class UserGroup extends CommonObject
|
|||
$error=0;
|
||||
$now=dol_now();
|
||||
|
||||
$entity=$conf->entity;
|
||||
if(! empty($conf->multicompany->enabled) && $conf->entity == 1)
|
||||
{
|
||||
$entity=$this->entity;
|
||||
}
|
||||
if (! isset($this->entity)) $this->entity=$conf->entity; // If not defined, we use default value
|
||||
|
||||
$entity=$this->entity;
|
||||
if (! empty($conf->multicompany->enabled) && $conf->entity == 1) $entity=$this->entity;
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."usergroup (";
|
||||
$sql.= "datec";
|
||||
|
|
@ -589,7 +587,7 @@ class UserGroup extends CommonObject
|
|||
$sql.= ",".$entity;
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog("UserGroup::Create sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG);
|
||||
$result=$this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
|
|
@ -612,7 +610,7 @@ class UserGroup extends CommonObject
|
|||
else
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("UserGroup::Create ".$this->error,LOG_ERR);
|
||||
dol_syslog(get_class($this)."::create ".$this->error,LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ If using Eclipse, select the test and click on menu "Run external tools and choo
|
|||
Note that xdebug must be installed for this feature to work.
|
||||
|
||||
* Generate a report of Unit tests code coverage among all Dolibarr classes:
|
||||
Increase your PHP memory (memory_limit and suhosin.memory_limit in php.ini) to 4G.
|
||||
Increase your PHP memory (memory_limit and suhosin.memory_limit in php.ini) to 4G. Note: Version 3.5 need 1.5G
|
||||
> cd test
|
||||
> phpunit -d suhosin.memory_limit=4G -d memory_limit=-1 -d max_input_time=0 -d max_execution_time=0 --configuration ./phpunit/phpunittest.xml --coverage-html ./report --coverage-clover ./report/logs/phpunit.coverage.xml --log-junit ./report/logs/phpunit.xml phpunit/AllTests.php
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ class ModulesTest extends PHPUnit_Framework_TestCase
|
|||
'CashDesk','Categorie','ClickToDial','Commande','Comptabilite','Contrat','Cron','Deplacement','Document','Don',
|
||||
'ECM','Expedition','Export','ExternalRss','ExternalSite','Facture',
|
||||
'Fckeditor','Ficheinter','Fournisseur','FTP','GeoIPMaxmind','Gravatar','Holiday','Import','Label','Ldap','Mailing',
|
||||
'Notification','Opensurvey','Paybox','Paypal','Prelevement','Product','Projet','Propale',
|
||||
'Notification','OpenSurvey','Paybox','Paypal','Prelevement','Product','Projet','Propale',
|
||||
'Service','Societe','Stock','Syslog','Tax','User','WebServices','Workflow');
|
||||
foreach($modulelist as $modlabel)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user