29require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
30require_once DOL_DOCUMENT_ROOT .
'/hrm/lib/hrm_skillrank.lib.php';
40 public $module =
'hrm';
45 public $element =
'skillrank';
50 public $table_element =
'hrm_skillrank';
56 public $ismultientitymanaged = 0;
61 public $isextrafieldmanaged = 0;
66 public $picto =
'skillrank@hrm';
69 const STATUS_DRAFT = 0;
70 const STATUS_VALIDATED = 1;
71 const STATUS_CANCELED = 9;
73 const SKILLRANK_TYPE_JOB =
"job";
74 const SKILLRANK_TYPE_USER =
"user";
75 const SKILLRANK_TYPE_EVALDET =
"evaluationdet";
107 public $fields=array(
108 'rowid' => array(
'type'=>
'integer',
'label'=>
'TechnicalID',
'enabled'=>
'1',
'position'=>1,
'notnull'=>1,
'visible'=>0,
'noteditable'=>
'1',
'index'=>1,
'css'=>
'left',
'comment'=>
"Id"),
109 'fk_skill' => array(
'type'=>
'integer:Skill:hrm/class/skill.class.php:1',
'label'=>
'Skill',
'enabled'=>
'1',
'position'=>3,
'notnull'=>1,
'visible'=>1,
'index'=>1,),
110 'rankorder' => array(
'type'=>
'integer',
'label'=>
'Rank',
'enabled'=>
'1',
'position'=>4,
'notnull'=>1,
'visible'=>1,
'default' => 0),
111 'fk_object' => array(
'type'=>
'integer',
'label'=>
'object',
'enabled'=>
'1',
'position'=>5,
'notnull'=>1,
'visible'=>0,),
112 'date_creation' => array(
'type'=>
'datetime',
'label'=>
'DateCreation',
'enabled'=>
'1',
'position'=>500,
'notnull'=>1,
'visible'=>-2,),
113 'tms' => array(
'type'=>
'timestamp',
'label'=>
'DateModification',
'enabled'=>
'1',
'position'=>501,
'notnull'=>0,
'visible'=>-2,),
114 'fk_user_creat' => array(
'type'=>
'integer:User:user/class/user.class.php',
'label'=>
'UserAuthor',
'enabled'=>
'1',
'position'=>510,
'notnull'=>1,
'visible'=>-2,
'foreignkey'=>
'user.rowid',),
115 'fk_user_modif' => array(
'type'=>
'integer:User:user/class/user.class.php',
'label'=>
'UserModif',
'enabled'=>
'1',
'position'=>511,
'notnull'=>-1,
'visible'=>-2,),
116 'objecttype' => array(
'type'=>
'varchar(128)',
'label'=>
'objecttype',
'enabled'=>
'1',
'position'=>6,
'notnull'=>1,
'visible'=>0,),
122 public $date_creation;
124 public $fk_user_creat;
125 public $fk_user_modif;
173 global $conf, $langs;
177 if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields[
'rowid'])) {
178 $this->fields[
'rowid'][
'visible'] = 0;
180 if (!isModEnabled(
'multicompany') && isset($this->fields[
'entity'])) {
181 $this->fields[
'entity'][
'enabled'] = 0;
191 foreach ($this->fields as $key => $val) {
192 if (isset($val[
'enabled']) && empty($val[
'enabled'])) {
193 unset($this->fields[$key]);
198 if (is_object($langs)) {
199 foreach ($this->fields as $key => $val) {
200 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
201 foreach ($val[
'arrayofkeyval'] as $key2 => $val2) {
202 $this->fields[$key][
'arrayofkeyval'][$key2] = $langs->trans($val2);
220 $sqlfilter =
'fk_object='.((int) $this->fk_object).
" AND objecttype='".$this->db->escape($this->objecttype).
"' AND fk_skill = ".((int) $this->fk_skill);
221 $alreadyLinked = $this->
fetchAll(
'ASC',
'rowid', 0, 0, array(
'customsql' => $sqlfilter));
222 if (!empty($alreadyLinked)) {
223 $this->error = $langs->trans(
'ErrSkillAlreadyAdded');
229 return $resultcreate;
241 global $langs, $extrafields;
246 $object =
new self($this->db);
251 $result = $object->fetchCommon($fromid);
252 if ($result > 0 && !empty($object->table_element_line)) {
253 $object->fetchLines();
262 unset($object->fk_user_creat);
263 unset($object->import_key);
266 if (property_exists($object,
'ref')) {
267 $object->ref = empty($this->fields[
'ref'][
'default']) ?
"Copy_Of_".$object->ref : $this->fields[
'ref'][
'default'];
269 if (property_exists($object,
'label')) {
270 $object->label = empty($this->fields[
'label'][
'default']) ? $langs->trans(
"CopyOf").
" ".$object->label : $this->fields[
'label'][
'default'];
272 if (property_exists($object,
'status')) {
273 $object->status = self::STATUS_DRAFT;
275 if (property_exists($object,
'date_creation')) {
276 $object->date_creation =
dol_now();
278 if (property_exists($object,
'date_modification')) {
279 $object->date_modification =
null;
283 if (is_array($object->array_options) && count($object->array_options) > 0) {
284 $extrafields->fetch_name_optionals_label($this->table_element);
285 foreach ($object->array_options as $key => $option) {
286 $shortkey = preg_replace(
'/options_/',
'', $key);
287 if (!empty($extrafields->attributes[$this->table_element][
'unique'][$shortkey])) {
289 unset($object->array_options[$key]);
295 $object->context[
'createfromclone'] =
'createfromclone';
296 $result = $object->createCommon($user);
299 $this->error = $object->error;
300 $this->errors = $object->errors;
312 if (property_exists($this,
'fk_soc') && $this->fk_soc == $object->socid) {
319 unset($object->context[
'createfromclone']);
326 $this->db->rollback();
338 public function fetch($id, $ref =
null)
341 if ($result > 0 && !empty($this->table_element_line)) {
354 $this->lines = array();
373 $this->fk_skill = $currentSkill->fk_skill;
374 $this->rankorder = $currentSkill->rankorder;
375 $this->fk_object = $fk_user;
376 $this->date_creation =
dol_now();
377 $this->fk_user_creat = $user->id;
378 $this->fk_user_modif = $user->id;
379 $this->objecttype = self::SKILLRANK_TYPE_USER;
380 $result = $this->
create($user);
396 public function fetchAll($sortorder =
'', $sortfield =
'', $limit = 0, $offset = 0, array $filter = array(), $filtermode =
'AND')
406 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
407 if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) {
408 $sql .=
' WHERE t.entity IN ('.getEntity($this->element).
')';
410 $sql .=
' WHERE 1 = 1';
414 if (count($filter) > 0) {
415 foreach ($filter as $key => $value) {
416 if ($key ==
't.rowid') {
417 $sqlwhere[] = $key.
" = ".((int) $value);
418 } elseif ($key !=
'customsql' && in_array($this->fields[$key][
'type'], array(
'date',
'datetime',
'timestamp'))) {
419 $sqlwhere[] = $key.
" = '".$this->db->idate($value).
"'";
420 } elseif ($key ==
'customsql') {
421 $sqlwhere[] = $value;
422 } elseif (strpos($value,
'%') ===
false) {
423 $sqlwhere[] = $key.
" IN (".$this->db->sanitize($this->db->escape($value)).
")";
425 $sqlwhere[] = $key.
" LIKE '%".$this->db->escape($value).
"%'";
429 if (count($sqlwhere) > 0) {
430 $sql .=
" AND (".implode(
" ".$filtermode.
" ", $sqlwhere).
")";
433 if (!empty($sortfield)) {
434 $sql .= $this->db->order($sortfield, $sortorder);
436 if (!empty($limit)) {
437 $sql .=
' '.$this->db->plimit($limit, $offset);
440 $resql = $this->db->query($sql);
442 $num = $this->db->num_rows($resql);
444 while ($i < ($limit ? min($limit, $num) : $num)) {
445 $obj = $this->db->fetch_object($resql);
447 $record =
new self($this->db);
448 $record->setVarsFromFetchObj($obj);
450 $records[$record->id] = $record;
454 $this->db->free($resql);
458 $this->errors[] =
'Error '.$this->db->lasterror();
459 dol_syslog(__METHOD__.
' '.join(
',', $this->errors), LOG_ERR);
484 public function delete(
User $user, $notrigger =
false)
500 if ($this->status < 0) {
501 $this->error =
'ErrorDeleteLineNotAllowedByObjectStatus';
518 global $conf, $langs;
520 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
525 if ($this->status == self::STATUS_VALIDATED) {
526 dol_syslog(get_class($this).
"::validate action abandonned: already validated", LOG_WARNING);
543 if (!$error && (preg_match(
'/^[\(]?PROV/i', $this->
ref) || empty($this->
ref))) {
548 $this->newref = $num;
552 $sql =
"UPDATE ".MAIN_DB_PREFIX.$this->table_element;
553 $sql .=
" SET ref = '".$this->db->escape($num).
"',";
554 $sql .=
" status = ".self::STATUS_VALIDATED;
555 if (!empty($this->fields[
'date_validation'])) {
556 $sql .=
", date_validation = '".$this->db->idate($now).
"'";
558 if (!empty($this->fields[
'fk_user_valid'])) {
559 $sql .=
", fk_user_valid = ".((int) $user->id);
561 $sql .=
" WHERE rowid = ".((int) $this->
id);
563 dol_syslog(get_class($this).
"::validate()", LOG_DEBUG);
564 $resql = $this->db->query($sql);
567 $this->error = $this->db->lasterror();
571 if (!$error && !$notrigger) {
573 $result = $this->
call_trigger(
'HRM_SKILLRANK_VALIDATE', $user);
582 $this->oldref = $this->ref;
585 if (preg_match(
'/^[\(]?PROV/i', $this->
ref)) {
587 $sql =
'UPDATE '.MAIN_DB_PREFIX.
"ecm_files set filename = CONCAT('".$this->db->escape($this->newref).
"', SUBSTR(filename, ".(strlen($this->
ref) + 1).
")), filepath = 'skillrank/".$this->db->escape($this->newref).
"'";
588 $sql .=
" WHERE filename LIKE '".$this->db->escape($this->
ref).
"%' AND filepath = 'skillrank/".$this->db->escape($this->
ref).
"' and entity = ".((int) $conf->entity);
589 $resql = $this->db->query($sql);
591 $error++; $this->error = $this->db->lasterror();
593 $sql =
'UPDATE '.MAIN_DB_PREFIX.
"ecm_files set filepath = 'skillrank/".$this->db->escape($this->newref).
"'";
594 $sql .=
" WHERE filepath = 'skillrank/".$this->db->escape($this->
ref).
"' and entity = ".$conf->entity;
595 $resql = $this->db->query($sql);
597 $error++; $this->error = $this->db->lasterror();
603 $dirsource = $conf->hrm->dir_output.
'/skillrank/'.$oldref;
604 $dirdest = $conf->hrm->dir_output.
'/skillrank/'.$newref;
605 if (!$error && file_exists($dirsource)) {
606 dol_syslog(get_class($this).
"::validate() rename dir ".$dirsource.
" into ".$dirdest);
608 if (@rename($dirsource, $dirdest)) {
611 $listoffiles =
dol_dir_list($conf->hrm->dir_output.
'/skillrank/'.$newref,
'files', 1,
'^'.preg_quote($oldref,
'/'));
612 foreach ($listoffiles as $fileentry) {
613 $dirsource = $fileentry[
'name'];
614 $dirdest = preg_replace(
'/^'.preg_quote($oldref,
'/').
'/', $newref, $dirsource);
615 $dirsource = $fileentry[
'path'].
'/'.$dirsource;
616 $dirdest = $fileentry[
'path'].
'/'.$dirdest;
617 @rename($dirsource, $dirdest);
627 $this->status = self::STATUS_VALIDATED;
634 $this->db->rollback();
650 if ($this->status <= self::STATUS_DRAFT) {
661 return $this->
setStatusCommon($user, self::STATUS_DRAFT, $notrigger,
'SKILLRANK_UNVALIDATE');
671 public function cancel($user, $notrigger = 0)
674 if ($this->status != self::STATUS_VALIDATED) {
685 return $this->
setStatusCommon($user, self::STATUS_CANCELED, $notrigger,
'SKILLRANK_CANCEL');
695 public function reopen($user, $notrigger = 0)
698 if ($this->status != self::STATUS_CANCELED) {
709 return $this->
setStatusCommon($user, self::STATUS_VALIDATED, $notrigger,
'SKILLRANK_REOPEN');
722 public function getNomUrl($withpicto = 0, $option =
'', $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
724 global $conf, $langs, $hookmanager;
726 if (!empty($conf->dol_no_mouse_hover)) {
732 $label =
img_picto(
'', $this->picto).
' <u>'.$langs->trans(
"SkillRank").
'</u>';
733 if (isset($this->status)) {
734 $label .=
' '.$this->getLibStatut(5);
737 $label .=
'<b>'.$langs->trans(
'Ref').
':</b> '.$this->ref;
739 $url =
dol_buildpath(
'/hrm/skillrank_card.php', 1).
'?id='.$this->id;
741 if ($option !=
'nolink') {
743 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
744 if ($save_lastsearch_value == -1 && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
745 $add_save_lastsearch_values = 1;
747 if ($add_save_lastsearch_values) {
748 $url .=
'&save_lastsearch_values=1';
753 if (empty($notooltip)) {
754 if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
755 $label = $langs->trans(
"ShowSkillRank");
756 $linkclose .=
' alt="'.dol_escape_htmltag($label, 1).
'"';
758 $linkclose .=
' title="'.dol_escape_htmltag($label, 1).
'"';
759 $linkclose .=
' class="classfortooltip'.($morecss ?
' '.$morecss :
'').
'"';
761 $linkclose = ($morecss ?
' class="'.$morecss.
'"' :
'');
764 if ($option ==
'nolink') {
765 $linkstart =
'<span';
767 $linkstart =
'<a href="'.$url.
'"';
769 $linkstart .= $linkclose.
'>';
770 if ($option ==
'nolink') {
771 $linkend =
'</span>';
776 $result .= $linkstart;
778 if (empty($this->showphoto_on_popup)) {
780 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
784 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
786 list($class, $module) = explode(
'@', $this->picto);
789 $filename = $filearray[0][
'name'];
790 if (!empty($filename)) {
791 $pospoint = strpos($filearray[0][
'name'],
'.');
793 $pathtophoto = $class.
'/'.$this->
ref.
'/thumbs/'.substr($filename, 0, $pospoint).
'_mini'.substr($filename, $pospoint);
794 if (empty($conf->global->{strtoupper($module.
'_'.$class).
'_FORMATLISTPHOTOSASUSERS'})) {
795 $result .=
'<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$module.
'" alt="No photo" border="0" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart='.$module.
'&entity='.$conf->entity.
'&file='.urlencode($pathtophoto).
'"></div></div>';
797 $result .=
'<div class="floatleft inline-block valignmiddle divphotoref"><img class="photouserphoto userphoto" alt="No photo" border="0" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart='.$module.
'&entity='.$conf->entity.
'&file='.urlencode($pathtophoto).
'"></div>';
802 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
807 if ($withpicto != 2) {
808 $result .= $this->ref;
814 global $action, $hookmanager;
815 $hookmanager->initHooks(array(
'skillrankdao'));
816 $parameters = array(
'id'=>$this->
id,
'getnomurl' => &$result);
817 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
819 $result = $hookmanager->resPrint;
821 $result .= $hookmanager->resPrint;
835 return $this->LibStatut($this->status, $mode);
849 if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
852 $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv(
'Draft');
853 $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv(
'Enabled');
854 $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv(
'Disabled');
855 $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv(
'Draft');
856 $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv(
'Enabled');
857 $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv(
'Disabled');
860 $statusType =
'status'.$status;
862 if ($status == self::STATUS_CANCELED) {
863 $statusType =
'status6';
866 return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status],
'', $statusType, $mode);
877 $sql =
'SELECT rowid, date_creation as datec, tms as datem,';
878 $sql .=
' fk_user_creat, fk_user_modif';
879 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
880 $sql .=
' WHERE t.rowid = '.((int) $id);
881 $result = $this->db->query($sql);
883 if ($this->db->num_rows($result)) {
884 $obj = $this->db->fetch_object($result);
885 $this->
id = $obj->rowid;
887 $this->user_creation_id = $obj->fk_user_creat;
888 $this->user_modification_id = $obj->fk_user_modif;
889 $this->date_creation = $this->db->jdate($obj->datec);
890 $this->date_modification = empty($obj->datem) ?
'' : $this->db->jdate($obj->datem);
893 $this->db->free($result);
911 $this->initAsSpecimenCommon();
921 $this->lines = array();
947 global $langs, $conf;
950 if (empty($conf->global->hrm_SKILLRANK_ADDON)) {
951 $conf->global->hrm_SKILLRANK_ADDON =
'mod_skillrank_standard';
954 if (!empty($conf->global->hrm_SKILLRANK_ADDON)) {
957 $file = $conf->global->hrm_SKILLRANK_ADDON.
".php";
958 $classname = $conf->global->hrm_SKILLRANK_ADDON;
961 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
962 foreach ($dirmodels as $reldir) {
966 $mybool |= @include_once $dir.$file;
969 if ($mybool ===
false) {
974 if (class_exists($classname)) {
975 $obj =
new $classname();
976 $numref = $obj->getNextValue($this);
978 if ($numref !=
'' && $numref !=
'-1') {
981 $this->error = $obj->error;
986 print $langs->trans(
"Error").
" ".$langs->trans(
"ClassNotFound").
' '.$classname;
990 print $langs->trans(
"ErrorNumberingModuleNotSetup", $this->element);
1006 public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams =
null)
1008 global $conf, $langs;
1011 $includedocgeneration = 0;
1013 $langs->load(
"hrm");
1016 $modele =
'standard_skillrank';
1018 if (!empty($this->model_pdf)) {
1019 $modele = $this->model_pdf;
1020 } elseif (!empty($conf->global->SKILLRANK_ADDON_PDF)) {
1021 $modele = $conf->global->SKILLRANK_ADDON_PDF;
1025 $modelpath =
"core/modules/hrm/doc/";
1027 if ($includedocgeneration && !empty($modele)) {
1028 $result = $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
1043 global $conf, $langs;
1059 $this->db->commit();
Parent class of all other business classes (invoices, contracts, proposals, orders,...
deleteLineCommon(User $user, $idline, $notrigger=false)
Delete a line of object in database.
fetchCommon($id, $ref=null, $morewhere='')
Load object in memory from the database.
createCommon(User $user, $notrigger=false)
Create object into database.
deleteCommon(User $user, $notrigger=false, $forcechilddeletion=0)
Delete object in database.
getFieldList($alias='', $excludefields=array())
Function to concat keys of fields.
setStatusCommon($user, $status, $notrigger=0, $triggercode='')
Set to a status.
copy_linked_contact($objFrom, $source='internal')
Copy contact from one element to current.
updateCommon(User $user, $notrigger=false)
Update object into database.
fetchLinesCommon($morewhere='')
Load object in memory from the database.
call_trigger($triggerName, $user)
Call trigger based on this instance.
Class to manage Dolibarr database access.
reopen($user, $notrigger=0)
Set back to validated status.
__construct(DoliDB $db)
Constructor.
deleteLine(User $user, $idline, $notrigger=false)
Delete a line of object in database.
fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, array $filter=array(), $filtermode='AND')
Load list of objects in memory from the database.
createFromClone(User $user, $fromid)
Clone an object into another one.
create(User $user, $notrigger=false)
Create object into database.
LibStatut($status, $mode=0)
Return the status.
setDraft($user, $notrigger=0)
Set draft status.
getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
Return a link to the object card (with optionaly the picto)
fetchLines()
Load object lines in memory from the database.
getNextNumRef()
Returns the reference to the following non used object depending on the active numbering module.
fetch($id, $ref=null)
Load object in memory from the database.
cloneFromCurrentSkill($currentSkill, $fk_user)
Clone skillrank Object linked to job with user id The skillrank table is a join table that is marked ...
initAsSpecimen()
Initialise object with example values Id must be 0 if object instance is a specimen.
doScheduledJob()
Action executed by scheduler CAN BE A CRON TASK.
generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
Create a document onto disk according to template module.
info($id)
Load the info information in the object.
validate($user, $notrigger=0)
Validate object.
getLibStatut($mode=0)
Return the label of the status.
cancel($user, $notrigger=0)
Set cancel status.
update(User $user, $notrigger=false)
Update object into database.
getLinesArray()
Create an array of lines.
Class to manage Dolibarr users.
dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
dol_now($mode='auto')
Return date for now.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.