dolibarr 20.0.0
functions.lib.php File Reference

A set of functions for Dolibarr This file contains all frequently used functions. More...

Go to the source code of this file.

Functions

if(!function_exists( 'utf8_encode')) if(!function_exists('utf8_decode')) if(!function_exists( 'str_starts_with')) if(!function_exists('str_ends_with')) if(!function_exists( 'str_contains')) getMultidirOutput ($object, $module='', $forobject=0, $mode='output')
 Return the full path of the directory where a module (or an object of a module) stores its files, Path may depends on the entity if a multicompany module is enabled.
 
 getMultidirTemp ($object, $module='', $forobject=0)
 Return the full path of the directory where a module (or an object of a module) stores its temporary files.
 
 getMultidirVersion ($object, $module='', $forobject=0)
 Return the full path of the directory where a module (or an object of a module) stores its versioned files.
 
 getDolGlobalString ($key, $default='')
 Return dolibarr global constant string value.
 
 getDolGlobalInt ($key, $default=0)
 Return a Dolibarr global constant int value.
 
 getDolUserString ($key, $default='', $tmpuser=null)
 Return Dolibarr user constant string value.
 
 getDolUserInt ($key, $default=0, $tmpuser=null)
 Return Dolibarr user constant int value.
 
 isModEnabled ($module)
 Is Dolibarr module enabled.
 
 isDolTms ($timestamp)
 isDolTms check if a timestamp is valid.
 
 getDoliDBInstance ($type, $host, $user, $pass, $name, $port)
 Return a DoliDB instance (database handler).
 
 getEntity ($element, $shared=1, $currentobject=null)
 Get list of entity id to use.
 
 setEntity ($currentobject)
 Set entity id to use when to create an object.
 
 isASecretKey ($keyname)
 Return if string has a name dedicated to store a secret.
 
 num2Alpha ($n)
 Return a numeric value into an Excel like column number.
 
 getBrowserInfo ($user_agent)
 Return information about user browser.
 
 dol_shutdown ()
 Function called at end of web php process.
 
 GETPOSTISSET ($paramname)
 Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
 
 GETPOSTISARRAY ($paramname, $method=0)
 Return true if the parameter $paramname is submit from a POST OR GET as an array.
 
 GETPOST ($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
 Return value of a param into GET or POST supervariable.
 
 GETPOSTINT ($paramname, $method=0)
 Return the value of a $_GET or $_POST supervariable, converted into integer.
 
 GETPOSTFLOAT ($paramname, $rounding='')
 Return the value of a $_GET or $_POST supervariable, converted into float.
 
 checkVal ($out='', $check='alphanohtml', $filter=null, $options=null)
 Return a sanitized or empty value after checking value against a rule.
 
 sanitizeVal ($out='', $check='alphanohtml', $filter=null, $options=null)
 Return a sanitized or empty value after checking value against a rule.
 
if(!function_exists( 'dol_getprefix')) dol_include_once ($relpath, $classname='')
 Make an include_once using default root and alternate root if it fails.
 
 dol_buildpath ($path, $type=0, $returnemptyifnotfound=0)
 Return path of url or filesystem.
 
 dol_get_object_properties ($obj, $properties=[])
 Get properties for an object - including magic properties when requested.
 
 dol_clone ($object, $native=0)
 Create a clone of instance of object (new instance with same value for each properties) With native = 0: Property that are references are different memory area in the new object (full isolation clone).
 
 dol_size ($size, $type='')
 Optimize a size for some browsers (phone, smarphone, ...)
 
 dol_sanitizeFileName ($str, $newstr='_', $unaccent=1)
 Clean a string to use it as a file name.
 
 dol_sanitizePathName ($str, $newstr='_', $unaccent=1)
 Clean a string to use it as a path name.
 
 dol_sanitizeUrl ($stringtoclean, $type=1)
 Clean a string to use it as an URL (into a href or src attribute)
 
 dol_sanitizeEmail ($stringtoclean)
 Clean a string to use it as an Email.
 
 dol_string_unaccent ($str)
 Clean a string from all accent characters to be used as ref, login or by dol_sanitizeFileName.
 
 dol_string_nospecial ($str, $newstr='_', $badcharstoreplace='', $badcharstoremove='', $keepspaces=0)
 Clean a string from all punctuation characters to use it as a ref or login.
 
 dol_string_nounprintableascii ($str, $removetabcrlf=1)
 Clean a string from all non printable ASCII chars (0x00-0x1F and 0x7F).
 
 dol_escape_js ($stringtoescape, $mode=0, $noescapebackslashn=0)
 Returns text escaped for inclusion into javascript code.
 
 dol_escape_json ($stringtoescape)
 Returns text escaped for inclusion into javascript code.
 
 dol_escape_php ($stringtoescape, $stringforquotes=2)
 Returns text escaped for inclusion into a php string, build with double quotes " or '.
 
 dol_escape_xml ($stringtoescape)
 Returns text escaped for inclusion into a XML string.
 
 dolPrintLabel ($s)
 Return a string label (so on 1 line only and that should not contains any HTML) ready to be output on HTML page To use text that is not HTML content inside an attribute, use can simply only dol_escape_htmltag().
 
 dolPrintHTML ($s, $allowiframe=0)
 Return a string (that can be on several lines) ready to be output on a HTML page.
 
 dolPrintHTMLForAttribute ($s)
 Return a string ready to be output on an HTML attribute (alt, title, data-html, ...)
 
 dolPrintHTMLForTextArea ($s, $allowiframe=0)
 Return a string ready to be output on input textarea.
 
 dolPrintPassword ($s)
 Return a string ready to be output on an HTML attribute (alt, title, ...)
 
 dol_escape_htmltag ($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
 Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input fields.
 
 dol_strtolower ($string, $encoding="UTF-8")
 Convert a string to lower.
 
 dol_strtoupper ($string, $encoding="UTF-8")
 Convert a string to upper.
 
 dol_ucfirst ($string, $encoding="UTF-8")
 Convert first character of the first word of a string to upper.
 
 dol_ucwords ($string, $encoding="UTF-8")
 Convert first character of all the words of a string to upper.
 
 dol_syslog ($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
 Write log message into outputs.
 
 dolButtonToOpenExportDialog ($name, $label, $buttonstring, $exportSiteName, $overwriteGitUrl, $website)
 Create a dialog with two buttons for export and overwrite of a website.
 
 dolButtonToOpenUrlInDialogPopup ($name, $label, $buttonstring, $url, $disabled='', $morecss='classlink button bordertransp', $jsonopen='', $backtopagejsfields='', $accesskey='')
 Return HTML code to output a button to open a dialog popup box.
 
 dol_fiche_head ($links=array(), $active='0', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
 Show tab header of a card.
 
 dol_get_fiche_head ($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
 Show tabs of a record.
 
 dol_fiche_end ($notab=0)
 Show tab footer of a card.
 
 dol_get_fiche_end ($notab=0)
 Return tab footer of a card.
 
 fieldLabel ($langkey, $fieldkey, $fieldrequired=0)
 Show a string with the label tag dedicated to the HTML edit field.
 
 dol_bc ($var, $moreclass='')
 Return string to add class property on html element with pair/impair.
 
 dol_format_address ($object, $withcountry=0, $sep="\n", $outputlangs=null, $mode=0, $extralangcode='')
 Return a formatted address (part address/zip/town/state) according to country rules.
 
 dol_strftime ($fmt, $ts=false, $is_gmt=false)
 Format a string.
 
 dol_print_date ($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
 Output date in a string format according to outputlangs (or langs if not defined).
 
 dol_getdate ($timestamp, $fast=false, $forcetimezone='')
 Return an array with locale date info.
 
 dol_mktime ($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
 Return a timestamp date built from detailed information (by default a local PHP server timestamp) Replace function mktime not available under Windows if year < 1970 PHP mktime is restricted to the years 1901-2038 on Unix and 1970-2038 on Windows.
 
 dol_now ($mode='auto')
 Return date for now.
 
 dol_print_size ($size, $shortvalue=0, $shortunit=0)
 Return string with formatted size.
 
 dol_print_url ($url, $target='_blank', $max=32, $withpicto=0, $morecss='')
 Show Url link.
 
 dol_print_email ($email, $cid=0, $socid=0, $addlink=0, $max=64, $showinvalid=1, $withpicto=0)
 Show EMail link formatted for HTML output.
 
 getArrayOfSocialNetworks ()
 Get array of social network dictionary.
 
 dol_print_socialnetworks ($value, $cid, $socid, $type, $dictsocialnetworks=array())
 Show social network link.
 
 dol_print_profids ($profID, $profIDtype, $countrycode='', $addcpButton=1)
 Format professional IDs according to their country.
 
 dol_print_phone ($phone, $countrycode='', $cid=0, $socid=0, $addlink='', $separ="&nbsp;", $withpicto='', $titlealt='', $adddivfloat=0, $morecss='')
 Format phone numbers according to country.
 
 dol_print_ip ($ip, $mode=0)
 Return an IP formatted to be shown on screen.
 
 getUserRemoteIP ()
 Return the IP of remote user.
 
 isHTTPS ()
 Return if we are using a HTTPS connection Check HTTPS (no way to be modified by user but may be empty or wrong if user is using a proxy) Take HTTP_X_FORWARDED_PROTO (defined when using proxy) Then HTTP_X_FORWARDED_SSL.
 
 dolGetCountryCodeFromIp ($ip)
 Return a country code from IP.
 
 dol_user_country ()
 Return country code for current user.
 
 dol_print_address ($address, $htmlid, $element, $id, $noprint=0, $charfornl='')
 Format address string.
 
 isValidEmail ($address, $acceptsupervisorkey=0, $acceptuserkey=0)
 Return true if email syntax is ok.
 
 isValidMXRecord ($domain)
 Return if the domain name has a valid MX record.
 
 isValidPhone ($phone)
 Return true if phone number syntax is ok TODO Decide what to do with this.
 
 dolGetFirstLetters ($s, $nbofchar=1)
 Return first letters of a strings.
 
 dol_strlen ($string, $stringencoding='UTF-8')
 Make a strlen call.
 
 dol_substr ($string, $start, $length=null, $stringencoding='', $trunconbytes=0)
 Make a substring.
 
 dol_trunc ($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
 Truncate a string to a particular length adding '…' if string larger than length.
 
 getPictoForType ($key, $morecss='')
 Return the picto for a data type.
 
 img_picto ($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
 Show picto whatever it's its name (generic function)
 
 img_object ($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
 Show a picto called object_picto (generic function)
 
 img_weather ($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $morecss='')
 Show weather picto.
 
 img_picto_common ($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $notitle=0)
 Show picto (generic function)
 
 img_action ($titlealt, $numaction, $picto='', $moreatt='')
 Show logo action.
 
 img_pdf ($titlealt='default', $size=3)
 Show pdf logo.
 
 img_edit_add ($titlealt='default', $other='')
 Show logo +.
 
 img_edit_remove ($titlealt='default', $other='')
 Show logo -.
 
 img_edit ($titlealt='default', $float=0, $other='')
 Show logo edit/modify fiche.
 
 img_view ($titlealt='default', $float=0, $other='class="valignmiddle"')
 Show logo view card.
 
 img_delete ($titlealt='default', $other='class="pictodelete"', $morecss='')
 Show delete logo.
 
 img_printer ($titlealt="default", $other='')
 Show printer logo.
 
 img_split ($titlealt='default', $other='class="pictosplit"')
 Show split logo.
 
 img_help ($usehelpcursor=1, $usealttitle=1)
 Show help logo with cursor "?".
 
 img_info ($titlealt='default')
 Show info logo.
 
 img_warning ($titlealt='default', $moreatt='', $morecss='pictowarning')
 Show warning logo.
 
 img_error ($titlealt='default')
 Show error logo.
 
 img_next ($titlealt='default', $moreatt='')
 Show next logo.
 
 img_previous ($titlealt='default', $moreatt='')
 Show previous logo.
 
 img_down ($titlealt='default', $selected=0, $moreclass='')
 Show down arrow logo.
 
 img_up ($titlealt='default', $selected=0, $moreclass='')
 Show top arrow logo.
 
 img_left ($titlealt='default', $selected=0, $moreatt='')
 Show left arrow logo.
 
 img_right ($titlealt='default', $selected=0, $moreatt='')
 Show right arrow logo.
 
 img_allow ($allow, $titlealt='default')
 Show tick logo if allowed.
 
 img_credit_card ($brand, $morecss=null)
 Return image of a credit card according to its brand name.
 
 img_mime ($file, $titlealt='', $morecss='')
 Show MIME img of a file.
 
 img_search ($titlealt='default', $other='')
 Show search logo.
 
 img_searchclear ($titlealt='default', $other='')
 Show search logo.
 
 info_admin ($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='')
 Show information in HTML for admin users or standard users.
 
 dol_print_error ($db=null, $error='', $errors=null)
 Displays error message system with all the information to facilitate the diagnosis and the escalation of the bugs.
 
 dol_print_error_email ($prefixcode, $errormessage='', $errormessages=array(), $morecss='error', $email='')
 Show a public email and error code to contact if technical error.
 
 print_liste_field_titre ($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
 Show title line of an array.
 
 getTitleFieldOfList ($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
 Get title line of an array.
 
 print_titre ($title)
 Show a title.
 
 print_fiche_titre ($title, $mesg='', $picto='generic', $pictoisfullpath=0, $id='')
 Show a title with picto.
 
 load_fiche_titre ($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
 Load a title with picto.
 
 print_barre_liste ($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
 Print a title with navigation controls for pagination.
 
 print_fleche_navigation ($page, $file, $options='', $nextpage=0, $betweenarrows='', $afterarrows='', $limit=-1, $totalnboflines=0, $hideselectlimit=0, $beforearrows='', $hidenavigation=0)
 Function to show navigation arrows into lists.
 
 vatrate ($rate, $addpercent=false, $info_bits=0, $usestarfornpr=0, $html=0)
 Return a string with VAT rate label formatted for view output Used into pdf and HTML pages.
 
 price ($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
 Function to format a value into an amount for visual output Function used into PDF and HTML pages.
 
 price2num ($amount, $rounding='', $option=0)
 Function that return a number with universal decimal format (decimal separator is '.
 
 showDimensionInBestUnit ($dimension, $unit, $type, $outputlangs, $round=-1, $forceunitoutput='no', $use_short_label=0)
 Output a dimension with best unit.
 
 get_localtax ($vatrate, $local, $thirdparty_buyer=null, $thirdparty_seller=null, $vatnpr=0)
 Return localtax rate for a particular vat, when selling a product with vat $vatrate, from a $thirdparty_buyer to a $thirdparty_seller Note: This function applies same rules than get_default_tva.
 
 isOnlyOneLocalTax ($local)
 Return true if LocalTax (1 or 2) is unique.
 
 get_localtax_by_third ($local)
 Get values of localtaxes (1 or 2) for company country for the common vat with the highest value.
 
 getTaxesFromId ($vatrate, $buyer=null, $seller=null, $firstparamisid=1)
 Get tax (VAT) main information from Id.
 
 getLocalTaxesFromRate ($vatrate, $local, $buyer, $seller, $firstparamisid=0)
 Get type and rate of localtaxes for a particular vat rate/country of a thirdparty.
 
 get_product_vat_for_country ($idprod, $thirdpartytouse, $idprodfournprice=0)
 Return vat rate of a product in a particular country, or default country vat if product is unknown.
 
 get_product_localtax_for_country ($idprod, $local, $thirdpartytouse)
 Return localtax vat rate of a product in a particular country or default country vat if product is unknown.
 
 get_default_tva (Societe $thirdparty_seller, Societe $thirdparty_buyer, $idprod=0, $idprodfournprice=0)
 Function that return vat rate of a product line (according to seller, buyer and product vat rate) VATRULE 1: If seller does not use VAT, default VAT is 0.
 
 get_default_npr (Societe $thirdparty_seller, Societe $thirdparty_buyer, $idprod=0, $idprodfournprice=0)
 Function that returns whether VAT must be recoverable collected VAT (e.g.: VAT NPR in France)
 
 get_default_localtax ($thirdparty_seller, $thirdparty_buyer, $local, $idprod=0)
 Function that return localtax of a product line (according to seller, buyer and product vat rate) If the seller is not subject to VAT, then default VAT=0.
 
 yn ($yesno, $case=1, $color=0)
 Return yes or no in current language.
 
 get_exdir ($num, $level, $alpha, $withoutslash, $object, $modulepart='')
 Return a path to have a the directory according to object where files are stored.
 
 dol_mkdir ($dir, $dataroot='', $newmask='')
 Creation of a directory (this can create recursive subdir)
 
 dolChmod ($filepath, $newmask='')
 Change mod of a file.
 
 picto_required ()
 Return picto saying a field is required.
 
 dol_string_nohtmltag ($stringtoclean, $removelinefeed=1, $pagecodeto='UTF-8', $strip_tags=0, $removedoublespaces=1)
 Clean a string from all HTML tags and entities.
 
 dol_string_onlythesehtmltags ($stringtoclean, $cleanalsosomestyles=1, $removeclassattribute=1, $cleanalsojavascript=0, $allowiframe=0, $allowed_tags=array(), $allowlink=0)
 Clean a string to keep only desirable HTML tags.
 
 dol_string_onlythesehtmlattributes ($stringtoclean, $allowed_attributes=null)
 Clean a string from some undesirable HTML tags.
 
 dol_string_neverthesehtmltags ($stringtoclean, $disallowed_tags=array('textarea'), $cleanalsosomestyles=0)
 Clean a string from some undesirable HTML tags.
 
 dolGetFirstLineOfText ($text, $nboflines=1, $charset='UTF-8')
 Return first line of text.
 
 dol_nl2br ($stringtoencode, $nl2brmode=0, $forxml=false)
 Replace CRLF in string with a HTML BR tag.
 
 dol_htmlwithnojs ($stringtoencode, $nouseofiframesandbox=0, $check='restricthtml')
 Sanitize a HTML to remove js, dangerous content and external link.
 
 dol_htmlentitiesbr ($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8', $removelasteolbr=1)
 This function is called to encode a string into a HTML string but differs from htmlentities because a detection is done before to see if text is already HTML or not.
 
 dol_htmlentitiesbr_decode ($stringtodecode, $pagecodeto='UTF-8')
 This function is called to decode a HTML string (it decodes entities and br tags)
 
 dol_htmlcleanlastbr ($stringtodecode)
 This function remove all ending
and br at end.
 
 dol_html_entity_decode ($a, $b, $c='UTF-8', $keepsomeentities=0)
 Replace html_entity_decode functions to manage errors.
 
 dol_htmlentities ($string, $flags=ENT_QUOTES|ENT_SUBSTITUTE, $encoding='UTF-8', $double_encode=false)
 Replace htmlentities functions.
 
 dol_string_is_good_iso ($s, $clean=0)
 Check if a string is a correct iso string If not, it will not be considered as HTML encoded even if it is by FPDF.
 
 dol_nboflines ($s, $maxchar=0)
 Return nb of lines of a clear text.
 
 dol_nboflines_bis ($text, $maxlinesize=0, $charset='UTF-8')
 Return nb of lines of a formatted text with
and
(WARNING: string must not have mixed
and br separators)
 
 dol_textishtml ($msg, $option=0)
 Return if a text is a html content.
 
 dol_concatdesc ($text1, $text2, $forxml=false, $invert=false)
 Concat 2 descriptions with a new line between them (second operand after first one with appropriate new line separator) text1 html + text2 html => text1 + '
' + text2 text1 html + text2 txt => text1 + '
' + dol_nl2br(text2) text1 txt + text2 html => dol_nl2br(text1) + '
' + text2 text1 txt + text2 txt => text1 + '
' + text2.
 
 getCommonSubstitutionArray ($outputlangs, $onlykey=0, $exclude=null, $object=null, $include=null)
 Return array of possible common substitutions.
 
 make_substitutions ($text, $substitutionarray, $outputlangs=null, $converttextinhtmlifnecessary=0)
 Make substitution into a text string, replacing keys with vals from $substitutionarray (oldval=>newval), and texts like __(TranslationKey|langfile)__ and [ConstantKey] are also replaced.
 
 complete_substitutions_array (&$substitutionarray, $outputlangs, $object=null, $parameters=null, $callfunc="completesubstitutionarray")
 Complete the $substitutionarray with more entries coming from external module that had set the "substitutions=1" into module_part array.
 
 print_date_range ($date_start, $date_end, $format='', $outputlangs=null)
 Format output for start and end date.
 
 get_date_range ($date_start, $date_end, $format='', $outputlangs=null, $withparenthesis=1)
 Format output for start and end date.
 
 dolGetFirstLastname ($firstname, $lastname, $nameorder=-1)
 Return firstname and lastname in correct order.
 
 setEventMessage ($mesgs, $style='mesgs', $noduplicate=0)
 Set event message in dol_events session object.
 
 setEventMessages ($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
 Set event messages in dol_events session object.
 
 dol_htmloutput_events ($disabledoutputofmessages=0)
 Print formatted messages to output (Used to show messages on html output).
 
 get_htmloutput_mesg ($mesgstring='', $mesgarray=[], $style='ok', $keepembedded=0)
 Get formatted messages to output (Used to show messages on html output).
 
 get_htmloutput_errors ($mesgstring='', $mesgarray=array(), $keepembedded=0)
 Get formatted error messages to output (Used to show messages on html output).
 
 dol_htmloutput_mesg ($mesgstring='', $mesgarray=array(), $style='ok', $keepembedded=0)
 Print formatted messages to output (Used to show messages on html output).
 
 dol_htmloutput_errors ($mesgstring='', $mesgarray=array(), $keepembedded=0)
 Print formatted error messages to output (Used to show messages on html output).
 
 dol_sort_array (&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
 Advanced sort array by the value of a given key, which produces ascending (default) or descending output and uses optionally natural case insensitive sorting (which can be optionally case sensitive as well).
 
 utf8_check ($str)
 Check if a string is in UTF8.
 
 utf8_valid ($str)
 Check if a string is in UTF8.
 
 ascii_check ($str)
 Check if a string is in ASCII.
 
 dol_osencode ($str)
 Return a string encoded into OS filesystem encoding.
 
 dol_getIdFromCode ($db, $key, $tablename, $fieldkey='code', $fieldid='id', $entityfilter=0, $filters='')
 Return an id or code from a code or id.
 
 isStringVarMatching ($var, $regextext, $matchrule=1)
 Check if a variable with name $var startx with $text.
 
 verifCond ($strToEvaluate, $onlysimplestring='1')
 Verify if condition in string is ok or not.
 
 dol_eval ($s, $returnvalue=1, $hideerrors=1, $onlysimplestring='1')
 Replace eval function to add more security.
 
 dol_validElement ($element)
 Return if var element is ok.
 
 picto_from_langcode ($codelang, $moreatt='', $notitlealt=0)
 Return img flag of country for a language code or country code.
 
 getLanguageCodeFromCountryCode ($countrycode)
 Return default language from country code.
 
 complete_head_from_modules ($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
 Complete or removed entries into a head array (used to build tabs).
 
 printCommonFooter ($zone='private')
 Print common footer : conf->global->MAIN_HTML_FOOTER js for switch of menu hider js for conf->global->MAIN_GOOGLE_AN_ID js for conf->global->MAIN_SHOW_TUNING_INFO or $_SERVER["MAIN_SHOW_TUNING_INFO"] js for conf->logbuffer.
 
 dolExplodeIntoArray ($string, $delimiter=';', $kv='=')
 Split a string with 2 keys into key array.
 
 dol_set_focus ($selector)
 Set focus onto field with selector (similar behaviour of 'autofocus' HTML5 tag)
 
 dol_getmypid ()
 Return getmypid() or random PID when function is disabled Some web hosts disable this php function for security reasons and sometimes we can't redeclare function.
 
 natural_search ($fields, $value, $mode=0, $nofirstand=0)
 Generate natural SQL search string for a criteria (this criteria can be tested on one or several fields)
 
 showDirectDownloadLink ($object)
 Return string with full Url.
 
 getImageFileNameForSize ($file, $extName, $extImgTarget='')
 Return the filename of file to get the thumbs.
 
 getAdvancedPreviewUrl ($modulepart, $relativepath, $alldata=0, $param='')
 Return URL we can use for advanced preview links.
 
 ajax_autoselect ($htmlname, $addlink='', $textonlink='Link')
 Make content of an input box selected when we click into input field.
 
 dolIsAllowedForPreview ($file)
 Return if a file is qualified for preview.
 
 dol_mimetype ($file, $default='application/octet-stream', $mode=0)
 Return MIME type of a file from its name with extension.
 
 getDictionaryValue ($tablename, $field, $id, $checkentity=false, $rowidfield='rowid')
 Return the value of a filed into a dictionary for the record $id.
 
 colorIsLight ($stringcolor)
 Return true if the color is light.
 
 isVisibleToUserType ($type_user, &$menuentry, &$listofmodulesforexternal)
 Function to test if an entry is enabled or not.
 
 roundUpToNextMultiple ($n, $x=5)
 Round to next multiple.
 
 dolGetBadge ($label, $html='', $type='primary', $mode='', $url='', $params=array())
 Function dolGetBadge.
 
 dolGetStatus ($statusLabel='', $statusLabelShort='', $html='', $statusType='status0', $displayMode=0, $url='', $params=array())
 Output the badge of a status.
 
 dolGetButtonAction ($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
 Function dolGetButtonAction.
 
 dolGetButtonTitleSeparator ($moreClass="")
 Add space between dolGetButtonTitle.
 
 getFieldErrorIcon ($fieldValidationErrorMsg)
 get field error icon
 
 dolGetButtonTitle ($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
 Function dolGetButtonTitle : this kind of buttons are used in title in list.
 
 getElementProperties ($elementType)
 Get an array with properties of an element.
 
 fetchObjectByElement ($element_id, $element_type, $element_ref='', $useCache=0, $maxCacheByType=10)
 Fetch an object from its id and element_type Inclusion of classes is automatic.
 
 isAFileWithExecutableContent ($filename)
 Return if a file can contains executable content.
 
 newToken ()
 Return the value of token currently saved into session with name 'newtoken'.
 
 currentToken ()
 Return the value of token currently saved into session with name 'token'.
 
 getNonce ()
 Return a random string to be used as a nonce value for js.
 
 startSimpleTable ($header, $link="", $arguments="", $emptyColumns=0, $number=-1, $pictofulllist='')
 Start a table with headers and a optional clickable number (don't forget to use "finishSimpleTable()" after the last table row)
 
 finishSimpleTable ($addLineBreak=false)
 Add the correct HTML close tags for "startSimpleTable(...)" (use after the last table line)
 
 addSummaryTableLine ($tableColumnCount, $num, $nbofloop=0, $total=0, $noneWord="None", $extraRightColumn=false)
 Add a summary line to the current open table ("None", "XMoreLines" or "Total xxx")
 
 readfileLowMemory ($fullpath_original_file_osencoded, $method=-1)
 Return a file on output using a low memory.
 
 showValueWithClipboardCPButton ($valuetocopy, $showonlyonhover=1, $texttoshow='')
 Create a button to copy $valuetocopy in the clipboard (for copy and paste feature).
 
 jsonOrUnserialize ($stringtodecode)
 Decode an encode string.
 
 forgeSQLFromUniversalSearchCriteria ($filter, &$errorstr='', $noand=0, $nopar=0, $noerror=0)
 forgeSQLFromUniversalSearchCriteria
 
 dolForgeExplodeAnd ($sqlfilters)
 Explode an universal search string with AND parts.
 
 dolCheckFilters ($sqlfilters, &$error='', &$parenthesislevel=0)
 Return if a $sqlfilters parameter has a valid balance of parenthesis.
 
 dolForgeDummyCriteriaCallback ($matches)
 Function to forge a SQL criteria from a Dolibarr filter syntax string.
 
 dolForgeCriteriaCallback ($matches)
 Function to forge a SQL criteria from a Dolibarr filter syntax string.
 
 getTimelineIcon ($actionstatic, &$histo, $key)
 Get timeline icon.
 
 getActionCommEcmList ($object)
 getActionCommEcmList
 
 show_actions_messaging ($conf, $langs, $db, $filterobj, $objcon=null, $noprint=0, $actioncode='', $donetodo='done', $filters=array(), $sortfield='a.datep, a.id', $sortorder='DESC')
 Show html area with actions in messaging format.
 
 GETPOSTDATE ($prefix, $hourTime='', $gm='auto')
 Helper function that combines values of a dolibarr DatePicker (such as Form\selectDate) for year, month, day (and optionally hour, minute, second) fields to return a timestamp.
 
 buildParamDate ($prefix, $timestamp=null, $hourTime='', $gm='auto')
 Helper function that combines values of a dolibarr DatePicker (such as Form\selectDate) for year, month, day (and optionally hour, minute, second) fields to return a a portion of URL reproducing the values from the current HTTP request.
 
 recordNotFound ($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
 Displays an error page when a record is not found.
 

Variables

const MODULE_MAPPING array( 'adherent' => 'member', 'member_type' => 'adherent_type', 'banque' => 'bank', 'contrat' => 'contract', 'entrepot' => 'stock', 'projet' => 'project', 'categorie' => 'category', 'commande' => 'order', 'expedition' => 'shipping', 'facture' => 'invoice', 'fichinter' => 'intervention', 'ficheinter' => 'intervention', 'propale' => 'propal', 'socpeople' => 'contact', 'fournisseur' => 'supplier', 'actioncomm' => 'agenda', 'product_price' => 'productprice', 'product_fournisseur_price' => 'productsupplierprice', )
 This mapping defines the conversion to the current internal names from the alternative allowed names (including effectively deprecated and future new names (not yet used as internal names).
 

Detailed Description

A set of functions for Dolibarr This file contains all frequently used functions.

Definition in file functions.lib.php.

Function Documentation

◆ addSummaryTableLine()

addSummaryTableLine ( $tableColumnCount,
$num,
$nbofloop = 0,
$total = 0,
$noneWord = "None",
$extraRightColumn = false )

Add a summary line to the current open table ("None", "XMoreLines" or "Total xxx")

Parameters
integer$tableColumnCountThe complete count columns of the table
integer$numThe count of the rows of the table, when it is zero (0) the "$noneWord" is shown instead
integer$nbofloop(optional) The maximum count of rows thaht the table show (when it is zero (0) no summary line will show, expect "$noneWord" when $num === 0)
integer$total(optional) The total value thaht is shown after when the table has minimum of one entire
string$noneWord(optional) The word that is shown when the table has no entries ($num === 0)
boolean$extraRightColumn(optional) Add a additional column after the summary word and total number
Returns
void

Definition at line 13199 of file functions.lib.php.

◆ ajax_autoselect()

ajax_autoselect ( $htmlname,
$addlink = '',
$textonlink = 'Link' )

Make content of an input box selected when we click into input field.

Parameters
string$htmlnameId of html object ('#idvalue' or '.classvalue')
string$addlinkAdd a 'link to' after
string$textonlinkText to show on link or 'image'
Returns
string

Definition at line 11580 of file functions.lib.php.

Referenced by dol_print_cron_urls(), FormFile\list_of_documents(), showDirectPublicLink(), and FormFile\showdocuments().

◆ ascii_check()

ascii_check ( $str)

Check if a string is in ASCII.

Parameters
string$strString to check
Returns
boolean True if string is ASCII, False if not (byte value > 0x7F)

Definition at line 10086 of file functions.lib.php.

Referenced by CMailFile\__construct(), Login\index(), and CMailFile\sendfile().

◆ buildParamDate()

buildParamDate ( $prefix,
$timestamp = null,
$hourTime = '',
$gm = 'auto' )

Helper function that combines values of a dolibarr DatePicker (such as Form\selectDate) for year, month, day (and optionally hour, minute, second) fields to return a a portion of URL reproducing the values from the current HTTP request.

Parameters
string$prefixPrefix used to build the date selector (for instance using Form\selectDate)
?int$timestampIf null, the timestamp will be created from request data
string$hourTimeIf timestamp is null, will be passed to GETPOSTDATE to construct the timestamp
string$gmIf timestamp is null, will be passed to GETPOSTDATE to construct the timestamp
Returns
string Portion of URL with query parameters for the specified date

Definition at line 14524 of file functions.lib.php.

◆ checkVal()

checkVal ( $out = '',
$check = 'alphanohtml',
$filter = null,
$options = null )

Return a sanitized or empty value after checking value against a rule.

Deprecated
Parameters
string | array$outValue to check/clear.
string$checkType of check/sanitizing
int$filterFilter to apply when $check is set to 'custom'. (See http://php.net/manual/en/filter.filters.php for détails)
mixed$optionsOptions to pass to filter_var when $check is set to 'custom'
Returns
string|array Value sanitized (string or array). It may be '' if format check fails.

Definition at line 1109 of file functions.lib.php.

◆ colorIsLight()

colorIsLight ( $stringcolor)

Return true if the color is light.

Parameters
string$stringcolorString with hex (FFFFFF) or comma RGB ('255,255,255')
Returns
int<-1,1> -1 : Error with argument passed |0 : color is dark | 1 : color is light

Definition at line 11999 of file functions.lib.php.

Referenced by Categorie\getNomUrl(), and Categorie\print_all_ways().

◆ complete_head_from_modules()

complete_head_from_modules ( $conf,
$langs,
$object,
& $head,
& $h,
$type,
$mode = 'add',
$filterorigmodule = '' )

Complete or removed entries into a head array (used to build tabs).

For example, with value added by external modules. Such values are declared into $conf->modules_parts['tab']. Or by change using hook completeTabsHead

Parameters
Conf$confObject conf
Translate$langsObject langs
object | null$objectObject object
array<array<int,string>>$head List of head tabs (updated by this function)
int$hNew position to fill (updated by this function)
string$typeValue for object where objectvalue can be 'thirdparty' to add a tab in third party view 'intervention' to add a tab in intervention view 'supplier_order' to add a tab in purchase order view 'supplier_invoice' to add a tab in purchase invoice view 'invoice' to add a tab in sales invoice view 'order' to add a tab in sales order view 'contract' to add a table in contract view 'product' to add a tab in product view 'propal' to add a tab in propal view 'user' to add a tab in user view 'group' to add a tab in group view 'member' to add a tab in foundation member view 'categories_x' to add a tab in category view ('x': type of category (0=product, 1=supplier, 2=customer, 3=member) 'ecm' to add a tab for another ecm view 'stock' to add a tab for warehouse view
string$mode'add' to complete head, 'remove' to remove entries
string$filterorigmoduleFilter on module origin: 'external' will show only external modules. 'core' only core modules. No filter (default) will add both.
Returns
void

Definition at line 10776 of file functions.lib.php.

Referenced by account_statement_prepare_head(), accounting_prepare_head(), actions_prepare_head(), agenda_prepare_head(), aiAdminPrepareHead(), assetAdminPrepareHead(), assetModelPrepareHead(), assetPrepareHead(), availabilitiesPrepareHead(), bank_admin_prepare_head(), bank_prepare_head(), blockedlogadmin_prepare_head(), bomAdminPrepareHead(), bomPrepareHead(), bon_prelevement_prepare_head(), bookcalAdminPrepareHead(), calendarPrepareHead(), calendars_prepare_head(), categories_prepare_head(), categoriesadmin_prepare_head(), commande_prepare_head(), company_admin_prepare_head(), conferenceorboothAttendeePrepareHead(), conferenceorboothPrepareHead(), conferenceorboothProjectPrepareHead(), contact_prepare_head(), contract_admin_prepare_head(), contract_prepare_head(), cron_prepare_head(), cronadmin_prepare_head(), datapolicyAdminPrepareHead(), dav_admin_prepare_head(), defaultvalues_prepare_head(), delivery_prepare_head(), donation_admin_prepare_head(), donation_prepare_head(), ecm_admin_prepare_head(), ecm_prepare_dasboard_head(), email_admin_prepare_head(), emailcollectorPrepareHead(), emailing_prepare_head(), establishment_prepare_head(), evaluationPrepareHead(), eventorganizationAdminPrepareHead(), expedition_admin_prepare_head(), expedition_prepare_head(), expensereport_admin_prepare_head(), expensereport_prepare_head(), facture_prepare_head(), facturefourn_prepare_head(), fichinter_admin_prepare_head(), fichinter_prepare_head(), fichinter_rec_prepare_head(), fiscalyear_prepare_head(), group_prepare_head(), holiday_admin_prepare_head(), holiday_prepare_head(), hrm_admin_prepare_head(), hrmAdminPrepareHead(), ihm_prepare_head(), intracommReportAdminPrepareHead(), intracommReportPrepareHead(), inventoryAdminPrepareHead(), inventoryPrepareHead(), invoice_admin_prepare_head(), invoice_rec_prepare_head(), jobPrepareHead(), knowledgemanagementAdminPrepareHead(), knowledgerecordPrepareHead(), ldap_prepare_head(), loan_prepare_head(), marges_admin_prepare_head(), marges_prepare_head(), member_admin_prepare_head(), member_prepare_head(), member_stats_prepare_head(), member_type_prepare_head(), modulehelp_prepare_head(), moPrepareHead(), mrpAdminPrepareHead(), multicurrencyAdminPrepareHead(), mymoduleAdminPrepareHead(), myobjectPrepareHead(), oauthadmin_prepare_head(), opensurvey_prepare_head(), order_admin_prepare_head(), ordersupplier_prepare_head(), partnershipAdminPrepareHead(), partnershipPrepareHead(), payment_expensereport_prepare_head(), paypaladmin_prepare_head(), pdf_admin_prepare_head(), positionCardPrepareHead(), prelevement_prepare_head(), product_admin_prepare_head(), product_lot_admin_prepare_head(), product_prepare_head(), productAttributePrepareHead(), productlot_prepare_head(), project_admin_prepare_head(), project_prepare_head(), project_timesheet_prepare_head(), propal_admin_prepare_head(), propal_prepare_head(), reception_admin_prepare_head(), reception_prepare_head(), recruitmentAdminPrepareHead(), recruitmentCandidaturePrepareHead(), recruitmentjobpositionPrepareHead(), resource_admin_prepare_head(), resource_prepare_head(), shipping_prepare_head(), skilldetPrepareHead(), skillPrepareHead(), skillrankPrepareHead(), societe_admin_prepare_head(), societe_prepare_head(), stock_admin_prepare_head(), stock_prepare_head(), stocktransferAdminPrepareHead(), stocktransferPrepareHead(), stripeadmin_prepare_head(), subscription_prepare_head(), supplier_invoice_rec_prepare_head(), supplierorder_admin_prepare_head(), takepos_admin_prepare_head(), targetPrepareHead(), task_prepare_head(), tax_prepare_head(), ticket_prepare_head(), ticketAdminPrepareHead(), translation_prepare_head(), trip_prepare_head(), user_admin_prepare_head(), user_prepare_head(), various_payment_prepare_head(), vat_prepare_head(), webhookAdminPrepareHead(), webportalAdminPrepareHead(), websiteaccountPrepareHead(), workstationAdminPrepareHead(), workstationPrepareHead(), and zapierAdminPrepareHead().

◆ complete_substitutions_array()

complete_substitutions_array ( & $substitutionarray,
$outputlangs,
$object = null,
$parameters = null,
$callfunc = "completesubstitutionarray" )

Complete the $substitutionarray with more entries coming from external module that had set the "substitutions=1" into module_part array.

In this case, method completesubstitutionarray provided by module is called.

Parameters
array<string,string>$substitutionarray Array substitution old value => new value value
Translate$outputlangsOutput language
CommonObject$objectSource object
mixed$parametersAdd more parameters (useful to pass product lines)
string$callfuncWhat is the name of the custom function that will be called? (default: completesubstitutionarray)
Returns
void
See also
make_substitutions()

Definition at line 9540 of file functions.lib.php.

Referenced by BordereauChequeBlochet\_pagefoot(), Facture\create(), FactureFournisseur\create(), PartnershipUtils\doCancelStatusOfMemberPartnership(), PartnershipUtils\doWarningOfPartnershipIfDolibarrBacklinkNotfound(), Adherent\makeSubstitution(), EmailCollector\overwritePropertiesOfObject(), pdf_pagefoot(), pdf_watermark(), Notify\send(), ActionComm\sendEmailsReminder(), Facture\sendEmailsRemindersOnInvoiceDueDate(), FactureFournisseur\sendEmailsRemindersOnSupplierInvoiceDueDate(), Adherent\sendReminderForExpiredSubscription(), doc_generic_asset_odt\write_file(), doc_generic_bom_odt\write_file(), doc_generic_contract_odt\write_file(), doc_generic_invoice_odt\write_file(), doc_generic_member_odt\write_file(), doc_generic_mo_odt\write_file(), doc_generic_myobject_odt\write_file(), doc_generic_odt\write_file(), doc_generic_order_odt\write_file(), doc_generic_product_odt\write_file(), doc_generic_project_odt\write_file(), doc_generic_proposal_odt\write_file(), doc_generic_reception_odt\write_file(), doc_generic_recruitmentjobposition_odt\write_file(), doc_generic_shipment_odt\write_file(), doc_generic_stock_odt\write_file(), doc_generic_supplier_invoice_odt\write_file(), doc_generic_supplier_order_odt\write_file(), doc_generic_supplier_proposal_odt\write_file(), doc_generic_task_odt\write_file(), doc_generic_ticket_odt\write_file(), doc_generic_user_odt\write_file(), doc_generic_usergroup_odt\write_file(), pdf_aurore\write_file(), pdf_azur\write_file(), pdf_baleine\write_file(), pdf_beluga\write_file(), pdf_canelle\write_file(), pdf_cornas\write_file(), pdf_crabe\write_file(), pdf_cyan\write_file(), pdf_eagle_proforma\write_file(), pdf_einstein\write_file(), pdf_eratosthene\write_file(), pdf_espadon\write_file(), pdf_octopus\write_file(), pdf_soleil\write_file(), pdf_sponge\write_file(), pdf_standard\write_file(), pdf_standard\write_file(), pdf_standard\write_file(), pdf_standard_asset\write_file(), pdf_standard_myobject\write_file(), pdf_standard_recruitmentjobposition\write_file(), pdf_timespent\write_file(), pdf_vinci\write_file(), and pdf_zenith\write_file().

◆ currentToken()

currentToken ( )

Return the value of token currently saved into session with name 'token'.

For ajax call, you must use this token as a parameter of the call into the js calling script (the called ajax php page must also set constant NOTOKENRENEWAL).

Since
Dolibarr v10.0.7
Returns
string

Definition at line 13095 of file functions.lib.php.

Referenced by dragAndDropFileUpload(), and Form\selectExpenseCategories().

◆ dol_bc()

dol_bc ( $var,
$moreclass = '' )

Return string to add class property on html element with pair/impair.

Parameters
boolean$varfalse or true
string$moreclassMore class to add
Returns
string String to add class onto HTML element

Definition at line 3075 of file functions.lib.php.

◆ dol_buildpath()

dol_buildpath ( $path,
$type = 0,
$returnemptyifnotfound = 0 )

Return path of url or filesystem.

Can check into alternate dir or alternate dir + main dir depending on value of $returnemptyifnotfound.

Parameters
string$pathRelative path to file (if mode=0) or relative url (if mode=1). Ie: mydir/myfile, ../myfile
int$type0=Used for a Filesystem path, 1=Used for an URL path (output relative), 2=Used for an URL path (output full path using same host that current url), 3=Used for an URL path (output full path using host defined into $dolibarr_main_url_root of conf file)
int$returnemptyifnotfound0:If $type==0 and if file was not found into alternate dir, return default path into main dir (no test on it) 1:If $type==0 and if file was not found into alternate dir, return empty string 2:If $type==0 and if file was not found into alternate dir, test into main dir, return default path if found, empty string if not found
Returns
string Full filesystem path (if path=0) or '' if file not found, Full url path (if mode=1)

Definition at line 1345 of file functions.lib.php.

Referenced by aiAdminPrepareHead(), ajouter_sondage(), checkLoginPassEntity(), CommonObject\commonGenerateDocument(), ActionsMyModule\completeTabsHead(), InterfaceTicketEmail\composeAndSendCustomerMessage(), Adherent\create(), Project\createFromClone(), doc_label_pdf_create(), evaluationPrepareHead(), fichinter_create(), CommonObject\formAddObjectLine(), ProductAttribute\formAddObjectLine(), Utils\generateDoc(), Don\generateDocument(), DolibarrCollector\getAssets(), Canvas\getCanvas(), DolibarrModules\getChangeLog(), Ticket\getDefaultRef(), DolibarrModules\getDescLong(), DolibarrModules\getDescLongReadmeFound(), MailingTargets\getEmailingSelectorsList(), Translate\getLabelFromNumber(), Asset\getNextNumRef(), Availabilities\getNextNumRef(), BOM\getNextNumRef(), Calendar\getNextNumRef(), Commande\getNextNumRef(), CommandeFournisseur\getNextNumRef(), ConferenceOrBoothAttendee\getNextNumRef(), Contrat\getNextNumRef(), Evaluation\getNextNumRef(), EvaluationLine\getNextNumRef(), Expedition\getNextNumRef(), ExpenseReport\getNextNumRef(), Facture\getNextNumRef(), FactureFournisseur\getNextNumRef(), Fichinter\getNextNumRef(), Holiday\getNextNumRef(), Job\getNextNumRef(), KnowledgeRecord\getNextNumRef(), Mo\getNextNumRef(), MyObject\getNextNumRef(), Paiement\getNextNumRef(), PaiementFourn\getNextNumRef(), Partnership\getNextNumRef(), Position\getNextNumRef(), ProductFournisseurPrice\getNextNumRef(), Propal\getNextNumRef(), Reception\getNextNumRef(), RecruitmentCandidature\getNextNumRef(), RecruitmentJobPosition\getNextNumRef(), RemiseCheque\getNextNumRef(), Skill\getNextNumRef(), Skilldet\getNextNumRef(), SkillRank\getNextNumRef(), StockTransfer\getNextNumRef(), StockTransferLine\getNextNumRef(), SupplierProposal\getNextNumRef(), Target\getNextNumRef(), TimeSpent\getNextNumRef(), Workstation\getNextNumRef(), Asset\getNomUrl(), AssetModel\getNomUrl(), Availabilities\getNomUrl(), Calendar\getNomUrl(), EmailCollectorAction\getNomUrl(), EmailCollectorFilter\getNomUrl(), Evaluation\getNomUrl(), EvaluationLine\getNomUrl(), Inventory\getNomUrl(), Job\getNomUrl(), KnowledgeRecord\getNomUrl(), MyObject\getNomUrl(), Position\getNomUrl(), ProductAttribute\getNomUrl(), ProductFournisseurPrice\getNomUrl(), Project\getNomUrl(), RecruitmentCandidature\getNomUrl(), RecruitmentJobPosition\getNomUrl(), Skill\getNomUrl(), Skilldet\getNomUrl(), SkillRank\getNomUrl(), StockTransfer\getNomUrl(), StockTransferLine\getNomUrl(), Target\getNomUrl(), TimeSpent\getNomUrl(), Workstation\getNomUrl(), Context\getRootConfigUrl(), Interfaces\getTriggersList(), ModeleBoxes\getWidgetsList(), DolibarrModules\insert_module_parts(), inventoryPrepareHead(), jobPrepareHead(), PrintingDriver\listDrivers(), llxHeaderTicket(), llxHeaderVierge(), ActionsMyModule\loadDataForCustomReports(), members_card_pdf_create(), multicurrencyAdminPrepareHead(), mymoduleAdminPrepareHead(), myobjectPrepareHead(), Ticket\newMessage(), oauthadmin_prepare_head(), positionCardPrepareHead(), print_auguria_menu(), print_eldy_menu(), print_left_auguria_menu(), print_left_eldy_menu(), CommonObject\printObjectLine(), ProductAttribute\printObjectLine(), CommonObject\printObjectLines(), ProductAttribute\printObjectLines(), CommonObject\printOriginLine(), resource_prepare_head(), Interfaces\run_triggers(), FormCompany\select_state_ajax(), FormCompany\selectCompaniesForNewContact(), FormProjets\selectInvoiceAndLine(), DataPolicy\sendMailDataPolicyAdherent(), DataPolicy\sendMailDataPolicyCompany(), DataPolicy\sendMailDataPolicyContact(), Conf\setValues(), show_skin(), showDirectPublicLink(), FormFile\showdocuments(), FormTicket\showForm(), Form\showLinkedObjectBlock(), MenuManager\showmenu(), showSkins(), showWebsiteTemplates(), skilldetPrepareHead(), skillPrepareHead(), skillrankPrepareHead(), stocktransferAdminPrepareHead(), stocktransferPrepareHead(), top_htmlhead(), and workstationPrepareHead().

◆ dol_clone()

dol_clone ( $object,
$native = 0 )

Create a clone of instance of object (new instance with same value for each properties) With native = 0: Property that are references are different memory area in the new object (full isolation clone).

This means $this->object of new object may not be valid (except this->db that is voluntarly kept). With native = 1: Use PHP clone. Property that are reference are same pointer. This means $this->db of new object is still valid but point to same this->db than original object. With native = 2: Property that are reference are different memory area in the new object (full isolation clone). Only scalar and array values are cloned. This means method are not availables and $this->db of new object is not valid.

@template T of object

Parameters
T$objectObject to clone
int$native0=Full isolation method, 1=Native PHP method, 2=Full isolation method keeping only scalar and array properties (recommended)
Returns
T Clone object
See also
https://php.net/manual/language.oop5.cloning.php @phan-suppress PhanTypeExpectedObjectPropAccess

Definition at line 1480 of file functions.lib.php.

Referenced by MouvementStock\_createSubProduct(), Ticket\assignUser(), Ticket\markAsRead(), Products\put(), InterfaceWebhookTriggers\runTrigger(), InterfaceZapierTriggers\runTrigger(), Fichinter\setDraft(), Fichinter\setRefClient(), ContratLigne\update(), Dolresource\update(), Product\update(), and Productlot\update().

◆ dol_concatdesc()

dol_concatdesc ( $text1,
$text2,
$forxml = false,
$invert = false )

Concat 2 descriptions with a new line between them (second operand after first one with appropriate new line separator) text1 html + text2 html => text1 + '
' + text2 text1 html + text2 txt => text1 + '
' + dol_nl2br(text2) text1 txt + text2 html => dol_nl2br(text1) + '
' + text2 text1 txt + text2 txt => text1 + '
' + text2.

Parameters
string$text1Text 1
string$text2Text 2
bool$forxmltrue=Use
instead of
if we have to add a br tag
bool$invertinvert order of description lines (we often use config MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION in this parameter)
Returns
string Text 1 + new line + Text2
See also
dol_textishtml()

Definition at line 8630 of file functions.lib.php.

Referenced by Propal\classifyBilled(), Propal\closeProposal(), RecruitmentJobPosition\cloture(), CommandeFournisseur\commande(), constructGanttLine(), Facture\create(), FactureFournisseur\create(), doc_getlinedesc(), Societe\mergeCompany(), Task\mergeTask(), pdf_getlinedesc(), pdf_getLinkedObjects(), InterfaceActionsAuto\runTrigger(), DataPolicy\sendMailDataPolicyAdherent(), DataPolicy\sendMailDataPolicyCompany(), DataPolicy\sendMailDataPolicyContact(), Adherent\sendReminderForExpiredSubscription(), pdf_aurore\write_file(), pdf_azur\write_file(), pdf_canelle\write_file(), pdf_cornas\write_file(), pdf_crabe\write_file(), pdf_cyan\write_file(), pdf_eagle_proforma\write_file(), pdf_einstein\write_file(), pdf_eratosthene\write_file(), pdf_espadon\write_file(), pdf_octopus\write_file(), pdf_soleil\write_file(), pdf_sponge\write_file(), pdf_standard\write_file(), pdf_standard_asset\write_file(), pdf_standard_myobject\write_file(), pdf_standard_recruitmentjobposition\write_file(), pdf_storm\write_file(), pdf_strato\write_file(), pdf_vinci\write_file(), and pdf_zenith\write_file().

◆ dol_escape_htmltag()

dol_escape_htmltag ( $stringtoescape,
$keepb = 0,
$keepn = 0,
$noescapetags = '',
$escapeonlyhtmltags = 0,
$cleanalsojavascript = 0 )

Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input fields.

When we need to output strings on pages, we should use:

  • dolPrintLabel...
  • dolPrintHTML... that is dol_escape_htmltag(dol_htmlwithnojs(dol_string_onlythesehtmltags(dol_htmlentitiesbr(), 1, 1, 1)), 1, 1) for notes or descriptions into textarea, add 'common' if into a html content
  • dolPrintPassword that is abelhtmlspecialchars( , ENT_COMPAT, 'UTF-8') for passwords.
Parameters
string$stringtoescapeString to escape
int$keepb1=Replace b tags with escaped value (except if in $noescapetags), 0=Remove them completely
int$keepn1=Preserve \r
strings, 0=Replace them with escaped value, -1=Remove them. Set to 1 when escaping for a <textarea>.
string$noescapetags'' or 'common' or list of tags to not escape.
int$escapeonlyhtmltags1=Escape only html tags, not the special chars like accents.
int$cleanalsojavascriptClean also javascript. @TODO switch this option to 1 by default.
Returns
string Escaped string
See also
dol_string_nohtmltag(), dol_string_onlythesehtmltags(), dol_string_nospecial(), dol_string_unaccent(), dol_htmlentitiesbr()

Definition at line 1931 of file functions.lib.php.

Referenced by pdf_standard_myobject\_pagehead(), ActionsStripeconnect\addMoreActionsButtons(), barcode_encode(), modPhpbarcode\buildBarCode(), Form\buttonsSaveCancel(), Form\constructProductListOption(), DolEditor\Create(), DolGraph\draw_chart(), DolGraph\draw_jflot(), Form\editfieldval(), FormCardWebPortal\elementCard(), FormListWebPortal\elementList(), Form\form_conditions_reglement(), form_constantes(), Form\form_date(), Form\form_modes_reglement(), Form\form_remise_dispo(), Form\formconfirm(), mailing_contacts1\formFilter(), mailing_partnership\formFilter(), mailing_thirdparties\formFilter(), FormProjets\formOpportunityStatus(), FormSetup\generateAttributesStringFromArray(), FormSetup\generateOutput(), FormListWebPortal\generatePageListNav(), Dolistore\get_categories(), FormMail\get_form(), Dolistore\get_next_link(), Dolistore\get_previous_link(), Dolistore\get_products(), FormCategory\getFilterBox(), FormOther\getHTMLScannerForm(), DolibarrModules\getKanbanView(), Holiday\getKanbanView(), Product\getKanbanView(), AccountingAccount\getNomUrl(), ActionComm\getNomUrl(), Adherent\getNomUrl(), Asset\getNomUrl(), BonPrelevement\getNomUrl(), Commande\getNomUrl(), CommandeFournisseur\getNomUrl(), Deplacement\getNomUrl(), DiscountAbsolute\getNomUrl(), Don\getNomUrl(), EcmDirectory\getNomUrl(), Facture\getNomUrl(), FactureFournisseur\getNomUrl(), FactureFournisseurRec\getNomUrl(), FactureRec\getNomUrl(), FichinterRec\getNomUrl(), Localtax\getNomUrl(), PaymentDonation\getNomUrl(), PaymentExpenseReport\getNomUrl(), PaymentLoan\getNomUrl(), PaymentSocialContribution\getNomUrl(), PaymentVAT\getNomUrl(), Position\getNomUrl(), ProductAttribute\getNomUrl(), Propal\getNomUrl(), Societe\getNomUrl(), Subscription\getNomUrl(), SupplierProposal\getNomUrl(), WebPortalInvoice\getNomUrl(), WebPortalMember\getNomUrl(), WebPortalOrder\getNomUrl(), WebPortalPartnership\getNomUrl(), WebPortalPropal\getNomUrl(), getRankOrderResults(), getSocialNetworkSharingLinks(), ActionComm\getTooltipContentArray(), Cronjob\getTooltipContentArray(), Societe\getTooltipContentArray(), FormCardWebPortal\header(), left_menu(), FormFile\list_of_autoecmfiles(), FormFile\list_of_documents(), FormFile\listOfLinks(), Form\load_tva(), box_boms\loadBox(), box_clients\loadBox(), box_commandes\loadBox(), box_contacts\loadBox(), box_contracts\loadBox(), box_dolibarr_state_board\loadBox(), box_external_rss\loadBox(), box_factures\loadBox(), box_factures_fourn\loadBox(), box_factures_fourn_imp\loadBox(), box_factures_imp\loadBox(), box_ficheinter\loadBox(), box_fournisseurs\loadBox(), box_last_knowledgerecord\loadBox(), box_last_modified_knowledgerecord\loadBox(), box_last_modified_ticket\loadBox(), box_last_ticket\loadBox(), box_members_by_tags\loadBox(), box_members_by_type\loadBox(), box_members_last_modified\loadBox(), box_members_last_subscriptions\loadBox(), box_mos\loadBox(), box_produits\loadBox(), box_propales\loadBox(), box_prospect\loadBox(), box_services_contracts\loadBox(), box_services_expired\loadBox(), box_supplier_orders\loadBox(), main_area(), Form\multiselectarray(), EmailCollector\overwritePropertiesOfObject(), print_auguria_menu(), print_eldy_menu(), print_text_menu_entry(), print_text_menu_entry_auguria(), print_text_menu_entry_empty(), printDropdownBookmarksList(), projectLinesa(), projectLinesPerAction(), projectLinesPerDay(), projectLinesPerWeek(), Form\searchComponent(), FormAccounting\select_accounting_category(), Form\select_all_categories(), Form\select_company(), Form\select_contact(), Form\select_country(), Form\select_dolresources_forevent(), Form\select_dolusers(), Form\select_dolusers_forevent(), FormAdmin\select_language(), FormAdmin\select_menu(), Form\select_produits_fournisseurs_list(), Form\select_thirdparty_list(), FormEcm\selectAllSections(), FormWebPortal\selectarray(), Form\selectAvailabilityDelay(), FormCompany\selectCompaniesForNewContact(), Form\selectCurrency(), FormWebPortal\selectForFormsList(), FormTicket\selectGroupTickets(), Form\selectMassAction(), FormCompany\selectProspectStatus(), FormProjets\selectTasks(), FormAdmin\selectTypeOfFields(), Utils\sendBackup(), Adherent\sendReminderForExpiredSubscription(), show_contacts(), CommonObject\show_photos(), show_projects(), show_subsidiaries(), ModeleBoxes\showBox(), FormFile\showdocuments(), FormTicket\showForm(), CommonObject\showInputField(), ExtraFields\showInputField(), FormWebPortal\showInputField(), Form\showLinkToObjectBlock(), FormTicket\showMessageForm(), showSkins(), showSocialNetwork(), Form\textwithtooltip(), Diff\toHTML(), top_menu(), top_menu_user(), and treeOutputForAbsoluteDir().

◆ dol_escape_js()

dol_escape_js ( $stringtoescape,
$mode = 0,
$noescapebackslashn = 0 )

Returns text escaped for inclusion into javascript code.

Parameters
string$stringtoescapeString to escape
int<0,3>$mode 0=Escape also ' and " into ', 1=Escape ' but not " for usage into 'string', 2=Escape " but not ' for usage into "string", 3=Escape ' and " with \
int$noescapebackslashn0=Escape also
. 1=Do not escape
.
Returns
string Escaped string. Both ' and " are escaped into ' if they are escaped.

Definition at line 1773 of file functions.lib.php.

Referenced by ajax_combobox(), ajax_constantonoff(), ActionsCardCompany\assign_values(), Form\buttonsSaveCancel(), constructGanttLine(), DolEditor\Create(), dolJSToSetRandomPassword(), dragAndDropFileUpload(), DolGraph\draw_chart(), DolGraph\draw_jflot(), FormFile\form_attach_new_file(), FormActions\form_select_status_action(), Form\formconfirm(), FormOther\getHTMLScannerForm(), DolibarrModules\getKanbanView(), Form\multiselectarray(), rebuildObjectClass(), FormAccounting\select_auxaccount(), Form\selectArrayAjax(), Form\selectArrayFilter(), FormCompany\selectCompaniesForNewContact(), Form\selectDate(), FormTicket\selectGroupTickets(), FormFile\showdocuments(), FormTicket\showForm(), and showSocialNetwork().

◆ dol_escape_json()

dol_escape_json ( $stringtoescape)

Returns text escaped for inclusion into javascript code.

Parameters
string$stringtoescapeString to escape
Returns
string Escaped string for JSON content.

Definition at line 1806 of file functions.lib.php.

Referenced by getStructuredData().

◆ dol_escape_php()

dol_escape_php ( $stringtoescape,
$stringforquotes = 2 )

Returns text escaped for inclusion into a php string, build with double quotes " or '.

Parameters
string$stringtoescapeString to escape
int<1,2>$stringforquotes 2=String for doublequotes, 1=String for simple quotes
Returns
string Escaped string for PHP content.

Definition at line 1818 of file functions.lib.php.

Referenced by rebuildObjectClass(), and write_conf_file().

◆ dol_escape_xml()

dol_escape_xml ( $stringtoescape)

Returns text escaped for inclusion into a XML string.

Parameters
string$stringtoescapeString to escape
Returns
string Escaped string for XML content.

Definition at line 1845 of file functions.lib.php.

Referenced by build_rssfile().

◆ dol_eval()

dol_eval ( $s,
$returnvalue = 1,
$hideerrors = 1,
$onlysimplestring = '1' )

Replace eval function to add more security.

This function is called by verifCond() or trans() and transnoentitiesnoconv().

Parameters
string$sString to evaluate
int<0,1>$returnvalue 0=No return (deprecated, used to execute eval($a=something)). 1=Value of eval is returned (used to eval($something)).
int<0,1>$hideerrors 1=Hide errors
string$onlysimplestring'0' (deprecated, do not use it anymore)=Accept all chars, '1' (most common use)=Accept only simple string with char 'a-z0-9\s^$_+-.*>&|=!?():"\',/@';', '2' (used for example for the compute property of extrafields)=Accept also '[]'
Returns
void|string Nothing or return result of eval (even if type can be int, it is safer to assume string and find all potential typing issues as abs(dol_eval(...)).
See also
verifCond(), checkPHPCode() to see sanitizing rules that should be very close. @phan-suppress PhanPluginUnsafeEval

Definition at line 10250 of file functions.lib.php.

Referenced by InterfaceTicketEmail\composeAndSendCustomerMessage(), CommonObject\fetch_optionals(), fillArrayOfGroupBy(), fillArrayOfMeasures(), fillArrayOfXAxis(), CommonObject\getTooltipContent(), FormListWebPortal\init(), CommonObject\insertExtraFields(), box_scheduled_jobs\loadBox(), FormWebPortal\selectForFormsList(), ExtraFields\setOptionalsFromPost(), CommonObject\setValuesForExtraLanguages(), show_contacts(), ExtraFields\showInputField(), CommonObject\showOptionals(), ExtraFields\showOutputField(), FormWebPortal\showOutputFieldForObject(), and CommonObject\updateExtraField().

◆ dol_fiche_end()

dol_fiche_end ( $notab = 0)

Show tab footer of a card.

Parameters
int<-1,1>$notab -1 or 0=Add tab footer, 1=no tab footer
Returns
void
Deprecated
Use print dol_get_fiche_end() instead

Definition at line 2653 of file functions.lib.php.

◆ dol_fiche_head()

dol_fiche_head ( $links = array(),
$active = '0',
$title = '',
$notab = 0,
$picto = '',
$pictoisfullpath = 0,
$morehtmlright = '',
$morecss = '',
$limittoshow = 0,
$moretabssuffix = '' )

Show tab header of a card.

Parameters
array<string,array<int<0,5>,string>>$links Array of tabs (0=>url, 1=>label, 2=>code, 3=>not used, 4=>text after link, 5=>morecssonlink). Currently initialized by calling a function xxx_admin_prepare_head. Note that label into $links[$i][1] must be already HTML escaped.
string$activeActive tab name (document', 'info', 'ldap', ....)
string$titleTitle
int$notab-1 or 0=Add tab header, 1=no tab header (if you set this to 1, using print dol_get_fiche_end() to close tab is not required), -2=Add tab header with no sepaaration under tab (to start a tab just after), -3=Add tab header but no footer separation
string$pictoAdd a picto on tab title
int$pictoisfullpathIf 1, image path is a full path. If you set this to 1, you can use url returned by dol_buildpath('/mymodyle/img/myimg.png',1) for $picto.
string$morehtmlrightAdd more html content on right of tabs title
string$morecssMore Css
int$limittoshowLimit number of tabs to show. Use 0 to use automatic default value.
string$moretabssuffixA suffix to use when you have several dol_get_fiche_head() in same page
Returns
void
Deprecated
Use print dol_get_fiche_head() instead

Definition at line 2441 of file functions.lib.php.

◆ dol_format_address()

dol_format_address ( $object,
$withcountry = 0,
$sep = "\n",
$outputlangs = null,
$mode = 0,
$extralangcode = '' )

Return a formatted address (part address/zip/town/state) according to country rules.

See https://en.wikipedia.org/wiki/Address

Parameters
Object$objectA company or contact object
int$withcountry1=Add country into address string
string$sepSeparator to use to separate info when building string
?Translate$outputlangsObject lang that contains language for text translation.
int$mode0=Standard output, 1=Remove address
string$extralangcodeUser extralanguage $langcode as values for address, town
Returns
string Formatted string
See also
dol_print_address()

Definition at line 3098 of file functions.lib.php.

Referenced by CommonObject\getFullAddress(), Adherent\getTooltipContentArray(), Contact\getTooltipContentArray(), Societe\getTooltipContentArray(), and pdf_build_address().

◆ dol_get_fiche_end()

dol_get_fiche_end ( $notab = 0)

Return tab footer of a card.

Parameters
int<-1,1>$notab -1 or 0=Add tab footer, 1=no tab footer
Returns
string

Definition at line 2664 of file functions.lib.php.

Referenced by ActionsAdherentCardDefault\assign_values(), ActionsCardCommon\assign_values(), ActionsCardProduct\assign_values(), ActionsCardService\assign_values(), ActionsContactCardDefault\assign_values(), displayPositionCard(), journalHead(), and report_header().

◆ dol_get_fiche_head()

dol_get_fiche_head ( $links = array(),
$active = '',
$title = '',
$notab = 0,
$picto = '',
$pictoisfullpath = 0,
$morehtmlright = '',
$morecss = '',
$limittoshow = 0,
$moretabssuffix = '',
$dragdropfile = 0 )

Show tabs of a record.

Parameters
array<int,array<int<0,5>,string>>$links Array of tabs (0=>url, 1=>label, 2=>code, 3=>not used, 4=>text after link, 5=>morecssonlink). Currently initialized by calling a function xxx_admin_prepare_head. Note that label into $links[$i][1] must be already HTML escaped.
string$activeActive tab name
string$titleTitle
int$notab-1 or 0=Add tab header, 1=no tab header (if you set this to 1, using print dol_get_fiche_end() to close tab is not required), -2=Add tab header with no separation under tab (to start a tab just after), -3=-2+'noborderbottom'
string$pictoAdd a picto on tab title
int$pictoisfullpathIf 1, image path is a full path. If you set this to 1, you can use url returned by dol_buildpath('/mymodyle/img/myimg.png',1) for $picto.
string$morehtmlrightAdd more html content on right of tabs title
string$morecssMore CSS on the link
int$limittoshowLimit number of tabs to show. Use 0 to use automatic default value.
string$moretabssuffixA suffix to use when you have several dol_get_fiche_head() in same page
int$dragdropfile0 (default) or 1. 1 enable a drop zone for file to be upload, 0 disable it
Returns
string

Definition at line 2462 of file functions.lib.php.

Referenced by ActionsAdherentCardDefault\assign_values(), ActionsCardCommon\assign_values(), ActionsCardProduct\assign_values(), ActionsCardService\assign_values(), ActionsContactCardDefault\assign_values(), displayPositionCard(), journalHead(), report_header(), and FormTicket\showForm().

◆ dol_get_object_properties()

dol_get_object_properties ( $obj,
$properties = [] )

Get properties for an object - including magic properties when requested.

Only returns properties that exist

Parameters
object$objObject to get properties from
string[]$propertiesOptional list of properties to get. When empty, only gets public properties.
Returns
array<string,mixed> Hash for retrieved values (key=name)

Definition at line 1441 of file functions.lib.php.

◆ dol_getdate()

dol_getdate ( $timestamp,
$fast = false,
$forcetimezone = '' )

Return an array with locale date info.

WARNING: This function use PHP server timezone by default to return locale information. Be aware to add the third parameter to "UTC" if you need to work on UTC.

Parameters
int$timestampTimestamp
boolean$fastFast mode. deprecated.
string$forcetimezone'' to use the PHP server timezone. Or use a form like 'gmt', 'Europe/Paris' or '+0200' to force timezone.
Returns
array{}|array{seconds:int<0,59>,minutes:int<0,59>,hours:int<0,23>,mday:int<1,31>,wday:int<0,6>,mon:int<1,12>,year:int<0,9999>,yday:int<0,366>,0:int} Array of information 'seconds' => $secs, 'minutes' => $min, 'hours' => $hour, 'mday' => $day, 'wday' => $dow, 0=sunday, 6=saturday 'mon' => $month, 'year' => $year, 'yday' => floor($secsInYear/$_day_power) '0' => original timestamp
See also
dol_print_date(), dol_stringtotime(), dol_mktime()

Definition at line 3475 of file functions.lib.php.

Referenced by modAdherent\__construct(), modFacture\__construct(), modFournisseur\__construct(), modHoliday\__construct(), modMultiCurrency\__construct(), modPartnership\__construct(), MouvementStock\_create(), Asset\calculationDepreciation(), ExpenseReport\computeTotalKm(), Facture\createFromClone(), FactureFournisseurRec\createRecurringInvoices(), FactureRec\createRecurringInvoices(), Project\createWeeklyReport(), dol_get_first_day_week(), dol_get_first_hour(), dol_get_last_hour(), dol_get_next_day(), dol_get_next_week(), dol_get_prev_day(), dol_get_prev_week(), dolWebsiteIncrementCounter(), Accountancy\exportData(), getCurrentPeriodOfFiscalYear(), ActionComm\getNomUrl(), Paiement\getNomUrl(), Facture\initAsSpecimen(), FactureFournisseurRec\initAsSpecimen(), FactureRec\initAsSpecimen(), Paiement\initAsSpecimen(), PaiementFourn\initAsSpecimen(), RemiseCheque\initAsSpecimen(), box_birthdays\loadBox(), box_birthdays_members\loadBox(), box_graph_invoices_permonth\loadBox(), box_graph_invoices_peryear\loadBox(), box_graph_invoices_supplier_permonth\loadBox(), box_graph_orders_permonth\loadBox(), box_graph_orders_supplier_permonth\loadBox(), box_graph_product_distribution\loadBox(), box_graph_propales_permonth\loadBox(), projectLinesPerDay(), projectLinesPerWeek(), Adherent\sendReminderForExpiredSubscription(), show_actions_done(), and FormActions\showactions().

◆ dol_getIdFromCode()

dol_getIdFromCode ( $db,
$key,
$tablename,
$fieldkey = 'code',
$fieldid = 'id',
$entityfilter = 0,
$filters = '' )

Return an id or code from a code or id.

Store also Code-Id into a cache to speed up next request on same table and key.

Parameters
DoliDB$dbDatabase handler
string | int$keyCode (string) or Id (int) to get Id or Code
string$tablenameTable name without prefix
string$fieldkeyField to search the key into
string$fieldidField to get
int$entityfilterFilter by entity
string$filtersFilters to add. WARNING: string must be escaped for SQL and not coming from user input.
Returns
int<-1,max>|string ID of code if OK, 0 if key empty, -1 if KO
See also
$langs->getLabelFromKey

Definition at line 10144 of file functions.lib.php.

Referenced by pdf_azur\_tableau_info(), Invoices\addPayment(), SupplierInvoices\addPayment(), Invoices\addPaymentDistributed(), Societe\create_from_member(), CommonInvoice\demande_prelevement(), Salary\demande_prelevement(), pdf_cyan\drawInfoTable(), FormProjets\formOpportunityStatus(), AccountancyCategory\getCptsCat(), CProductNature\getProductNatureFromCode(), CUnits\getUnitFromCode(), Form\load_cache_vatrates(), box_funnel_of_prospection\loadBox(), num_public_holiday(), print_projecttasks_array(), RemiseCheque\rejectCheck(), Notify\send(), BlockedLog\setObjectData(), Societe\setThirdpartyType(), and Adherent\subscriptionComplementaryActions().

◆ dol_getmypid()

dol_getmypid ( )

Return getmypid() or random PID when function is disabled Some web hosts disable this php function for security reasons and sometimes we can't redeclare function.

Returns
int

Definition at line 11256 of file functions.lib.php.

◆ dol_html_entity_decode()

dol_html_entity_decode ( $a,
$b,
$c = 'UTF-8',
$keepsomeentities = 0 )

Replace html_entity_decode functions to manage errors.

Parameters
string$aOperand a
string$bOperand b (ENT_QUOTES|ENT_HTML5=convert simple, double quotes, colon, e accent, ...)
string$cOperand c
int$keepsomeentitiesEntities but &, <, >, " are not converted.
Returns
string String decoded

Definition at line 8427 of file functions.lib.php.

Referenced by Project\createFromClone(), Task\createFromClone(), Mailing\fetch(), jsUnEscape(), and pdf_getlinedesc().

◆ dol_htmlcleanlastbr()

dol_htmlcleanlastbr ( $stringtodecode)

This function remove all ending
and br at end.

Parameters
string$stringtodecodeString to decode
Returns
string String decoded

Definition at line 8411 of file functions.lib.php.

Referenced by ActionComm\create(), ExportCsv\csvClean(), getInvoice(), ExtraFields\getOptionalsFromPost(), getSupplierInvoicesForThirdParty(), and ActionComm\update().

◆ dol_htmlentities()

dol_htmlentities ( $string,
$flags = ENT_QUOTES | ENT_SUBSTITUTE,
$encoding = 'UTF-8',
$double_encode = false )

Replace htmlentities functions.

Goal of this function is to be sure to have default values of htmlentities that match what we need.

Parameters
string$stringThe input string to encode
int$flagsFlags (see PHP doc above)
string$encodingEncoding page code
bool$double_encodeWhen double_encode is turned off, PHP will not encode existing html entities
Returns
string $ret Encoded string
See also
dol_htmlentitiesbr()

Definition at line 8451 of file functions.lib.php.

Referenced by FormSetupItem\generateInputFieldTextarea(), FormMail\get_form(), getTaskProgressView(), FormCardWebPortal\header(), box_task\loadBox(), run_sql(), Form\showrefnav(), and top_htmlhead().

◆ dol_htmlentitiesbr()

dol_htmlentitiesbr ( $stringtoencode,
$nl2brmode = 0,
$pagecodefrom = 'UTF-8',
$removelasteolbr = 1 )

This function is called to encode a string into a HTML string but differs from htmlentities because a detection is done before to see if text is already HTML or not.

Also, all entities but &,<,>," are converted. This permits to encode special chars to entities with no double encoding for already encoded HTML strings. This function also remove last EOL or BR if $removelasteolbr=1 (default). For PDF usage, you can show text by 2 ways:

  • writeHTMLCell -> param must be encoded into HTML.
  • MultiCell -> param must not be encoded into HTML. Because writeHTMLCell convert also
    into
    , if function is used to build PDF, nl2brmode must be 1. Note: When we output string on pages, we should use
  • dolPrintHTML... that is dol_escape_htmltag(dol_htmlwithnojs(dol_string_onlythesehtmltags(dol_htmlentitiesbr(), 1, 1, 1), 1, 1) for notes or descriptions,
  • dolPrintPassword that is abelhtmlspecialchars( , ENT_COMPAT, 'UTF-8') for passwords.
Parameters
string$stringtoencodeString to encode
int$nl2brmode0=Adding br before
, 1=Replacing
by br (for use with FPDF writeHTMLCell function for example)
string$pagecodefromPagecode stringtoencode is encoded
int$removelasteolbr1=Remove last br or lasts
(default), 0=Do nothing
Returns
string String encoded
See also
dol_escape_htmltag(), dolGetFirstLineOfText(), dol_string_onlythesehtmltags()

Definition at line 8361 of file functions.lib.php.

Referenced by pdf_crabe\_tableau_info(), pdf_octopus\drawInfoTable(), pdf_sponge\drawInfoTable(), Form\editfieldval(), Skill\getNomUrl(), box_services_contracts\loadBox(), Adherent\makeSubstitution(), Form\multiselectarray(), pdf_getlinedesc(), pdf_getlinenum(), pdf_getlineref(), pdf_getlineref_supplier(), pdf_pagefoot(), CommonObject\printObjectLine(), Adherent\sendEmail(), show_ldap_content(), show_list_sending_receive(), pdf_aurore\write_file(), pdf_azur\write_file(), pdf_baleine\write_file(), pdf_ban\write_file(), pdf_beluga\write_file(), pdf_canelle\write_file(), pdf_cornas\write_file(), pdf_crabe\write_file(), pdf_cyan\write_file(), pdf_eagle\write_file(), pdf_eagle_proforma\write_file(), pdf_einstein\write_file(), pdf_eratosthene\write_file(), pdf_espadon\write_file(), pdf_merou\write_file(), pdf_muscadet\write_file(), pdf_octopus\write_file(), pdf_rouget\write_file(), pdf_sepamandate\write_file(), pdf_soleil\write_file(), pdf_sponge\write_file(), pdf_squille\write_file(), pdf_standard\write_file(), pdf_standard\write_file(), pdf_standard_asset\write_file(), pdf_standard_myobject\write_file(), pdf_standard_recruitmentjobposition\write_file(), pdf_storm\write_file(), pdf_strato\write_file(), pdf_timespent\write_file(), pdf_typhon\write_file(), pdf_vinci\write_file(), and pdf_zenith\write_file().

◆ dol_htmlentitiesbr_decode()

dol_htmlentitiesbr_decode ( $stringtodecode,
$pagecodeto = 'UTF-8' )

This function is called to decode a HTML string (it decodes entities and br tags)

Parameters
string$stringtodecodeString to decode
string$pagecodetoPage code for result
Returns
string String decoded

Definition at line 8395 of file functions.lib.php.

Referenced by pdf_standard_actions\_pages(), AdherentType\getMailOnExclude(), AdherentType\getMailOnResiliate(), AdherentType\getMailOnSubscription(), and AdherentType\getMailOnValid().

◆ dol_htmloutput_errors()

dol_htmloutput_errors ( $mesgstring = '',
$mesgarray = array(),
$keepembedded = 0 )

Print formatted error messages to output (Used to show messages on html output).

Parameters
string$mesgstringError message
string[]$mesgarrayError messages array
int<0,1>$keepembedded Set to 1 in error message must be kept embedded into its html place (this disable jnotify)
Returns
void
See also
dol_print_error()
dol_htmloutput_mesg()

Definition at line 9956 of file functions.lib.php.

◆ dol_htmloutput_events()

dol_htmloutput_events ( $disabledoutputofmessages = 0)

Print formatted messages to output (Used to show messages on html output).

Note: Calling dol_htmloutput_events is done into pages by standard llxFooter() function, so there is no need to call it explicitly.

Parameters
int$disabledoutputofmessagesClear all messages stored into session without displaying them
Returns
void
See also
dol_htmloutput_mesg()

Definition at line 9761 of file functions.lib.php.

Referenced by llxFooterSurvey().

◆ dol_htmloutput_mesg()

dol_htmloutput_mesg ( $mesgstring = '',
$mesgarray = array(),
$style = 'ok',
$keepembedded = 0 )

Print formatted messages to output (Used to show messages on html output).

Parameters
string$mesgstringMessage string or message key
string[]$mesgarrayArray of message strings or message keys
string$styleWhich style to use ('ok', 'warning', 'error')
int$keepembeddedSet to 1 if message must be kept embedded into its html place (this disable jnotify)
Returns
void
See also
dol_print_error()
dol_htmloutput_errors()
setEventMessages()

Definition at line 9888 of file functions.lib.php.

Referenced by ActionsStripeconnect\formObjectOptions().

◆ dol_htmlwithnojs()

dol_htmlwithnojs ( $stringtoencode,
$nouseofiframesandbox = 0,
$check = 'restricthtml' )

Sanitize a HTML to remove js, dangerous content and external link.

This function is used by dolPrintHTML... function for example.

Parameters
string$stringtoencodeString to encode
int$nouseofiframesandbox0=Default, 1=Allow use of option MAIN_SECURITY_USE_SANDBOX_FOR_HTMLWITHNOJS for html sanitizing (not yet working)
string$check'restricthtmlnolink' or 'restricthtml' or 'restricthtmlallowclass' or 'restricthtmlallowunvalid'
Returns
string HTML sanitized
Parameters
string[]$m
Returns
string

Definition at line 8160 of file functions.lib.php.

Referenced by Form\editfieldval().

◆ dol_include_once()

if(!function_exists('dol_getprefix')) dol_include_once ( $relpath,
$classname = '' )

Make an include_once using default root and alternate root if it fails.

To link to a core file, use include(DOL_DOCUMENT_ROOT.'/pathtofile') To link to a module file from a module file, use include './mymodulefile'; To link to a module file from a core file, then this function can be used (call by hook / trigger / speciales pages)

Parameters
string$relpathRelative path to file (Ie: mydir/myfile, ../myfile, ...)
string$classnameClass name (deprecated)
Returns
bool True if load is a success, False if it fails

Definition at line 1313 of file functions.lib.php.

Referenced by FileUpload\__construct(), InvoiceListController\action(), ActionsCardCommon\assign_values(), Export\build_file(), Product\check_barcode(), Societe\check_codeclient(), Societe\check_codefournisseur(), Societe\codeclient_modifiable(), Societe\codefournisseur_modifiable(), Contrat\create(), Product\create(), Contrat\createFromClone(), Project\createFromClone(), Propal\createFromClone(), Societe\delete(), CommonObject\deleteCommon(), dolGetElementUrl(), CommonObject\fetchObjectLinked(), CommonDocGenerator\fill_substitutionarray_with_extrafields(), fillArrayOfGroupBy(), fillArrayOfMeasures(), fillArrayOfXAxis(), Utils\generateDoc(), Product\get_barcode(), Societe\get_codecompta(), MouvementStock\get_origin(), Ticket\getDefaultRef(), ImportCsv\import_insert(), ImportXlsx\import_insert(), FormCardWebPortal\init(), FormListWebPortal\init(), HookManager\initHooks(), CommonObject\insertExtraFields(), FormFile\list_of_autoecmfiles(), InfoBox\listBoxes(), migrate_reload_modules(), AdvanceTargetingMailing\query_contact(), Cronjob\run_jobs(), FormWebPortal\selectForForms(), CSMSFile\sendfile(), Conf\setValues(), FormSms\show_form(), and FormTicket\showForm().

◆ dol_mimetype()

dol_mimetype ( $file,
$default = 'application/octet-stream',
$mode = 0 )

Return MIME type of a file from its name with extension.

Parameters
string$fileFilename we looking for MIME type
string$defaultDefault mime type if extension not found in known list
int<0,4>$mode 0=Return full mime, 1=otherwise short mime string, 2=image for mime type, 3=source language, 4=css of font fa
Returns
string Return a mime type family (text/xxx, application/xxx, image/xxx, audio, video, archive)
See also
dolIsAllowedForPreview(), image_format_supported() from images.lib.php

Definition at line 11638 of file functions.lib.php.

Referenced by FormMail\add_attached_files(), Documents\builddoc(), vCard\buildVCardString(), doc_label_pdf_create(), dol_init_file_process(), getDocument(), FormFile\getDocumentsLink(), FormWebPortal\getDocumentsLink(), FileUpload\getFileObject(), FileUpload\handleFileUpload(), Documents\index(), DocumentController\init(), Facture\sendEmailsRemindersOnInvoiceDueDate(), FormFile\showdocuments(), FormTicket\showMessageForm(), ActionsTicket\viewTicketMessages(), and pdf_standard\write_file().

◆ dol_mkdir()

dol_mkdir ( $dir,
$dataroot = '',
$newmask = '' )

Creation of a directory (this can create recursive subdir)

Parameters
string$dirDirectory to create (Separator must be '/'. Example: '/mydir/mysubdir')
string$datarootData root directory (To avoid having the data root in the loop. Using this will also lost the warning, on first dir, saying PHP has no permission when open_basedir is used)
string$newmaskMask for new file (Defaults to $conf->global->MAIN_UMASK or 0755 if unavailable). Example: '0444'
Returns
int Return integer < 0 if KO, 0 = already exists, > 0 if OK

Definition at line 7696 of file functions.lib.php.

Referenced by Categorie\add_photo(), Product\add_photo(), mailing_xinputfile\add_to_target(), ActionComm\build_exportfile(), Export\build_file(), Ticket\copyFilesForTicket(), BonPrelevement\create(), EcmDirectory\create(), Website\create(), DolibarrModules\create_dirs(), Project\createFromClone(), Task\createFromClone(), Website\createFromClone(), FileUpload\createScaledImage(), dol_add_file_process(), dol_filecache(), dol_meta_create(), dol_uncompress(), dolCopyDir(), dolSaveCssFile(), dolSaveHtaccessFile(), dolSaveHtmlHeader(), dolSaveIndexPage(), dolSaveJsFile(), dolSaveLicense(), dolSaveManifestJson(), dolSavePageAlias(), dolSaveReadme(), dolSaveRobotFile(), Ldap\dump(), Utils\dumpDatabase(), AccountancyExport\export(), Website\exportWebSite(), CMailFile\findHtmlImagesIsSrcData(), Utils\generateDoc(), Stats\getAllByProductEntry(), getAllImages(), Stats\getAmountByMonthWithPrevYear(), Stats\getNbByMonthWithPrevYear(), ProjectStats\getTransformRateByMonthWithPrevYear(), ProjectStats\getWeightedAmountByMonthWithPrevYear(), FileUpload\handleFileUpload(), modBom\init(), modCommande\init(), modContrat\init(), modEventOrganization\init(), modExpedition\init(), modFacture\init(), modFournisseur\init(), modKnowledgeManagement\init(), modMrp\init(), modMyModule\init(), modPartnership\init(), modProjet\init(), modPropale\init(), modReception\init(), modRecruitment\init(), modSociete\init(), modStock\init(), modSupplierProposal\init(), modTicket\init(), modWebsite\init(), modWorkstation\init(), migrate_product_photospath(), migrate_user_filespath(), migrate_user_photospath(), migrate_user_photospath2(), Website\overwriteTemplate(), RssParser\parser(), pdf_getInstance(), Documents\post(), Utils\purgeFiles(), rebuild_merge_pdf(), rebuildObjectClass(), rebuildObjectSql(), Cronjob\run_jobs(), InterfaceActionsAuto\runTrigger(), saveAttachment(), Website\update(), vignette(), BordereauChequeBlochet\write_file(), doc_generic_asset_odt\write_file(), doc_generic_bom_odt\write_file(), doc_generic_contract_odt\write_file(), doc_generic_invoice_odt\write_file(), doc_generic_member_odt\write_file(), doc_generic_mo_odt\write_file(), doc_generic_myobject_odt\write_file(), doc_generic_odt\write_file(), doc_generic_order_odt\write_file(), doc_generic_product_odt\write_file(), doc_generic_project_odt\write_file(), doc_generic_proposal_odt\write_file(), doc_generic_reception_odt\write_file(), doc_generic_recruitmentjobposition_odt\write_file(), doc_generic_shipment_odt\write_file(), doc_generic_stock_odt\write_file(), doc_generic_supplier_invoice_odt\write_file(), doc_generic_supplier_order_odt\write_file(), doc_generic_supplier_proposal_odt\write_file(), doc_generic_task_odt\write_file(), doc_generic_ticket_odt\write_file(), doc_generic_user_odt\write_file(), doc_generic_usergroup_odt\write_file(), html_cerfafr\write_file(), html_generic\write_file(), pdf_aurore\write_file(), pdf_azur\write_file(), pdf_baleine\write_file(), pdf_ban\write_file(), pdf_beluga\write_file(), pdf_canelle\write_file(), pdf_cornas\write_file(), pdf_crabe\write_file(), pdf_cyan\write_file(), pdf_eagle\write_file(), pdf_eagle_proforma\write_file(), pdf_einstein\write_file(), pdf_eratosthene\write_file(), pdf_espadon\write_file(), pdf_merou\write_file(), pdf_muscadet\write_file(), pdf_octopus\write_file(), pdf_paiement\write_file(), pdf_rouget\write_file(), pdf_sepamandate\write_file(), pdf_soleil\write_file(), pdf_sponge\write_file(), pdf_squille\write_file(), pdf_standard\write_file(), pdf_standard\write_file(), pdf_standard\write_file(), pdf_standard\write_file(), pdf_standard_actions\write_file(), pdf_standard_asset\write_file(), pdf_standard_myobject\write_file(), pdf_standard_recruitmentjobposition\write_file(), pdf_standardlabel\write_file(), pdf_storm\write_file(), pdf_strato\write_file(), pdf_tcpdflabel\write_file(), pdf_timespent\write_file(), pdf_typhon\write_file(), pdf_vinci\write_file(), pdf_zenith\write_file(), modPhpbarcode\writeBarCode(), and modTcpdfbarcode\writeBarCode().

◆ dol_mktime()

dol_mktime ( $hour,
$minute,
$second,
$month,
$day,
$year,
$gm = 'auto',
$check = 1 )

Return a timestamp date built from detailed information (by default a local PHP server timestamp) Replace function mktime not available under Windows if year < 1970 PHP mktime is restricted to the years 1901-2038 on Unix and 1970-2038 on Windows.

Parameters
int$hourHour (can be -1 for undefined)
int$minuteMinute (can be -1 for undefined)
int$secondSecond (can be -1 for undefined)
int$monthMonth (1 to 12)
int$dayDay (1 to 31)
int$yearYear
mixed$gmTrue or 1 or 'gmt'=Input information are GMT values False or 0 or 'tzserver' = local to server TZ 'auto' 'tzuser' = local to user TZ taking dst into account at the current date. Not yet implemented. 'tzuserrel' = local to user TZ taking dst into account at the given date. Use this one to convert date input from user into a GMT date. 'tz,TimeZone' = use specified timezone
int$check0=No check on parameters (Can use day 32, etc...)
Returns
int|string Date as a timestamp, '' if error
See also
dol_print_date(), dol_stringtotime(), dol_getdate()

Definition at line 3522 of file functions.lib.php.

Referenced by modAdherent\__construct(), modFacture\__construct(), modFournisseur\__construct(), modHoliday\__construct(), modMultiCurrency\__construct(), modPartnership\__construct(), MouvementStock\_create(), Product\_get_stats(), pdf_paiement\_pagehead(), mailing_fraise\add_to_target(), CommonInvoice\calculate_date_lim_reglement(), Facture\createFromClone(), Project\createFromClone(), Task\createFromClone(), FactureFournisseurRec\createRecurringInvoices(), FactureRec\createRecurringInvoices(), Project\createWeeklyReport(), FormCardWebPortal\doActions(), dol_get_first_day(), dol_get_first_day_week(), dol_get_first_hour(), dol_get_last_day(), dol_get_last_hour(), dol_get_next_day(), dol_get_next_week(), dol_get_prev_day(), dol_get_prev_week(), dol_stringtotime(), dol_time_plus_duree(), dolSqlDateFilter(), dolWebsiteIncrementCounter(), FormListWebPortal\elementList(), Accountancy\exportData(), get_next_value(), getCurrentPeriodOfFiscalYear(), getDefaultDatesForTransfer(), ExtraFields\getOptionalsFromPost(), ICal\ical_date_to_unix(), Facture\initAsSpecimen(), FactureFournisseurRec\initAsSpecimen(), FactureRec\initAsSpecimen(), Paiement\initAsSpecimen(), PaiementFourn\initAsSpecimen(), RemiseCheque\initAsSpecimen(), DoliDB\jdate(), Adherent\sendReminderForExpiredSubscription(), AssetDepreciationOptions\setDeprecationOptionsFromPost(), ExtraFields\setOptionalsFromPost(), CommonObject\setValuesForExtraLanguages(), show_actions_done(), show_bookcal_day_events(), show_contacts(), show_day_events(), and CommonObject\showOptionals().

◆ dol_nboflines()

dol_nboflines ( $s,
$maxchar = 0 )

Return nb of lines of a clear text.

Parameters
string$sString to check
int$maxcharNot yet used
Returns
int Number of lines
See also
dol_nboflines_bis(), dolGetFirstLineOfText()

Definition at line 8499 of file functions.lib.php.

Referenced by pdf_standard_actions\_pages().

◆ dol_nboflines_bis()

dol_nboflines_bis ( $text,
$maxlinesize = 0,
$charset = 'UTF-8' )

Return nb of lines of a formatted text with
and
(WARNING: string must not have mixed
and br separators)

Parameters
string$textText
int$maxlinesizeLinewidth in character count (default = 0 == nolimit)
string$charsetGive the charset used to encode the $text variable in memory.
Returns
int Number of lines
See also
dol_nboflines(), dolGetFirstLineOfText()

Definition at line 8520 of file functions.lib.php.

Referenced by pdf_aurore\_pagehead().

◆ dol_nl2br()

dol_nl2br ( $stringtoencode,
$nl2brmode = 0,
$forxml = false )

Replace CRLF in string with a HTML BR tag.

WARNING: The content after operation contains some HTML tags (the
) so be sure to also have encoded the special chars of stringtoencode into HTML before with dol_htmlentitiesbr().

Parameters
string$stringtoencodeString to encode
int$nl2brmode0=Adding br before
, 1=Replacing
by br
bool$forxmlfalse=Use
, true=Use
Returns
string String encoded
See also
dol_htmlentitiesbr(), dol_nboflines(), dolGetFirstLineOfText()

Definition at line 8137 of file functions.lib.php.

Referenced by CMailFile\__construct(), DolEditor\__construct(), ActionsAdherentCardCommon\assign_values(), ActionsCardCommon\assign_values(), ActionsContactCardCommon\assign_values(), InterfaceTicketEmail\composeAndSendAdminMessage(), InterfaceTicketEmail\composeAndSendCustomerMessage(), Form\editInPlace(), Ai\generateContent(), FormSetupItem\generateOutputField(), FormMail\get_form(), Ticket\newMessage(), InterfaceTicketEmail\runTrigger(), and FormTicket\showMessageForm().

◆ dol_now()

dol_now ( $mode = 'auto')

Return date for now.

In most cases, we use this function without parameters (that means GMT time).

Parameters
string$mode'auto' => for backward compatibility (avoid this), 'gmt' => we return GMT timestamp, 'tzserver' => we add the PHP server timezone 'tzref' => we add the company timezone. Not implemented. 'tzuser' or 'tzuserrel' => we add the user timezone
Returns
int $date Timestamp

Definition at line 3610 of file functions.lib.php.

Referenced by BonPrelevement\__construct(), Evaluation\__construct(), modAccounting\__construct(), modAdherent\__construct(), modAgenda\__construct(), modFacture\__construct(), modFournisseur\__construct(), modHoliday\__construct(), modMultiCurrency\__construct(), modPartnership\__construct(), modProduct\__construct(), modService\__construct(), modSociete\__construct(), DolibarrApiAccess\__isAllowed(), MouvementStock\_create(), Product\_log_price(), pdf_ban\_pagehead(), pdf_standard\_pagehead(), Contrat\activateAll(), CommonObject\add_contact(), Product\add_fournisseur(), mailing_fraise\add_to_target(), mailing_thirdparties_services_expired\add_to_target(), Opensurveysondage\addComment(), Account\addline(), Holiday\addLogCP(), BonPrelevement\addNotification(), addObjectsToApiFile(), Tva\addPayment(), Task\addTimeSpent(), CommandeFournisseur\approve(), Partnership\approve(), archiveOrBackupFile(), build_calfile(), ActionComm\build_exportfile(), Export\build_file(), CommandeFournisseur\calcAndSetStatusDispatch(), Mo\cancelConsumedAndProducedLines(), check_user_password_dolibarr(), Propal\classifyBilled(), Product\clone_fournisseurs(), Product\clone_price(), SkillRank\cloneFromCurrentSkill(), Ticket\close(), Contrat\closeAll(), BookKeeping\closeFiscalPeriod(), Propal\closeProposal(), Commande\cloture(), RecruitmentJobPosition\cloture(), SupplierProposal\cloture(), InterfaceTicketEmail\composeAndSendCustomerMessage(), ExpenseReport\computeTotalKm(), Ticket\copyFilesForTicket(), AdherentStats\countMembersByTagAndStatus(), AdherentStats\countMembersByTypeAndStatus(), Account\create(), AccountancySystem\create(), AccountingAccount\create(), ActionComm\create(), Adherent\create(), AdvanceTargetingMailing\create(), BlockedLog\create(), BonPrelevement\create(), BookKeeping\create(), Bookmark\create(), CashControl\create(), Categorie\create(), ChargeSociales\create(), Commande\create(), CommandeFournisseur\create(), CompanyBankAccount\create(), Contact\create(), Contrat\create(), Cronjob\create(), CurrencyRate\create(), Delivery\create(), Deplacement\create(), DiscountAbsolute\create(), Dolresource\create(), Don\create(), EcmDirectory\create(), EcmFiles\create(), Entrepot\create(), Establishment\create(), Expedition\create(), ExpenseReport\create(), Facture\create(), FactureFournisseur\create(), FactureFournisseurRec\create(), FactureRec\create(), Fichinter\create(), FichinterRec\create(), Fiscalyear\create(), Holiday\create(), Link\create(), Loan\create(), LoanSchedule\create(), Mailing\create(), MultiCurrency\create(), Notify\create(), Paiement\create(), PaiementFourn\create(), PaymentDonation\create(), PaymentExpenseReport\create(), PaymentLoan\create(), PaymentSalary\create(), PaymentSocialContribution\create(), PaymentVarious\create(), PaymentVAT\create(), Product\create(), ProductCustomerPrice\create(), Productlot\create(), Project\create(), Propal\create(), Propalmergepdfproduct\create(), Reception\create(), ReceptionLineBatch\create(), RejetPrelevement\create(), RemiseCheque\create(), Salary\create(), Societe\create(), Subscription\create(), SupplierProposal\create(), Task\create(), Ticket\create(), Tva\create(), User\create(), UserBankAccount\create(), UserGroup\create(), Website\create(), ExtraFields\create_label(), createActionComm(), CommonObject\createCommon(), Thirdparties\createCompanyBankAccount(), createContact(), Facture\createDepositFromOrigin(), AssetModel\createFromClone(), Availabilities\createFromClone(), Calendar\createFromClone(), Commande\createFromClone(), CommandeFournisseur\createFromClone(), ConferenceOrBoothAttendee\createFromClone(), CTicketCategory\createFromClone(), Evaluation\createFromClone(), EvaluationLine\createFromClone(), Facture\createFromClone(), FactureFournisseur\createFromClone(), Job\createFromClone(), KnowledgeRecord\createFromClone(), Mailing\createFromClone(), MyObject\createFromClone(), Partnership\createFromClone(), Position\createFromClone(), ProductFournisseurPrice\createFromClone(), Project\createFromClone(), Propal\createFromClone(), RecruitmentCandidature\createFromClone(), RecruitmentJobPosition\createFromClone(), Skill\createFromClone(), Skilldet\createFromClone(), SkillRank\createFromClone(), SupplierProposal\createFromClone(), Target\createFromClone(), Task\createFromClone(), TimeSpent\createFromClone(), Website\createFromClone(), WebsitePage\createFromClone(), Workstation\createFromClone(), Facture\createFromContract(), Facture\createFromOrder(), Commande\createFromProposal(), createInvoice(), createOrder(), createPayment(), SupplierProposal\createPriceFournisseur(), createProductOrService(), FactureFournisseurRec\createRecurringInvoices(), FactureRec\createRecurringInvoices(), BookKeeping\createStd(), createThirdParty(), Ticket\createTicketMessage(), Project\createWeeklyReport(), Stripe\customerStripe(), Mo\deleteLine(), Task\delTimeSpent(), CommonInvoice\demande_prelevement(), Salary\demande_prelevement(), CommandeFournisseur\dispatchProduct(), Contrat\doAutoRenewContracts(), PartnershipUtils\doCancelStatusOfMemberPartnership(), dol_cache_refresh(), dol_dir_list(), dolPrintSignatureImage(), dolSessionGC(), dolSessionWrite(), dolWebsiteIncrementCounter(), AssetModel\doScheduledJob(), Availabilities\doScheduledJob(), BOM\doScheduledJob(), Calendar\doScheduledJob(), ConferenceOrBooth\doScheduledJob(), ConferenceOrBoothAttendee\doScheduledJob(), KnowledgeRecord\doScheduledJob(), MyObject\doScheduledJob(), RecruitmentCandidature\doScheduledJob(), RecruitmentJobPosition\doScheduledJob(), StockTransfer\doScheduledJob(), StockTransferLine\doScheduledJob(), PartnershipUtils\doWarningOfPartnershipIfDolibarrBacklinkNotfound(), CMailFile\dump_mail(), Utils\dumpDatabase(), mod_syslog_file\export(), Accountancy\exportData(), Website\exportWebSite(), Contrat\fetch_lines(), BonPrelevement\generate(), Utils\generateDoc(), get_next_value(), CommonDocGenerator\get_substitutionarray_other(), Stats\getAllByProductEntry(), Stats\getAmountByMonthWithPrevYear(), AccountingJournal\getAssetData(), html_generic\getContents(), getCurrentPeriodOfFiscalYear(), getDefaultDatesForTransfer(), ContratLigne\getLibStatut(), Stats\getNbByMonthWithPrevYear(), mailing_thirdparties_services_expired\getNbOfRecipients(), mod_barcode_product_standard\getNextValue(), mod_barcode_thirdparty_standard\getNextValue(), mod_chequereceipt_thyme\getNextValue(), mod_codeclient_elephant\getNextValue(), mod_codeclient_monkey\getNextValue(), mod_codeproduct_elephant\getNextValue(), mod_commande_saphir\getNextValue(), mod_delivery_jade\getNextValue(), mod_facture_mercure\getNextValue(), mod_lot_advanced\getNextValue(), mod_lot_standard\getNextValue(), mod_member_advanced\getNextValue(), mod_project_simple\getNextValue(), mod_project_universal\getNextValue(), mod_propale_saphir\getNextValue(), mod_reception_moonstone\getNextValue(), mod_sn_advanced\getNextValue(), mod_sn_standard\getNextValue(), mod_takepos_ref_universal\getNextValue(), mod_task_simple\getNextValue(), mod_task_universal\getNextValue(), mod_ticket_simple\getNextValue(), mod_ticket_universal\getNextValue(), getNumberInvoicesPieChart(), Societe\getOutstandingBills(), Stripe\getPaymentIntent(), getServerTimeZoneInt(), Cronjob\getTooltipContentArray(), Opensurveysondage\getTooltipContentArray(), ProjectStats\getTransformRateByMonthWithPrevYear(), ProjectStats\getWeightedAmountByMonthWithPrevYear(), ActionComm\hasDelay(), Adherent\hasDelay(), Commande\hasDelay(), CommandeFournisseur\hasDelay(), ExpenseReport\hasDelay(), Facture\hasDelay(), FactureFournisseur\hasDelay(), Project\hasDelay(), Task\hasDelay(), Status\index(), modBlockedLog\init(), modEmailCollector\init(), modTakePos\init(), ActionComm\initAsSpecimen(), Adherent\initAsSpecimen(), BOM\initAsSpecimen(), BookKeeping\initAsSpecimen(), ChargeSociales\initAsSpecimen(), CommandeFournisseur\initAsSpecimen(), CompanyBankAccount\initAsSpecimen(), Contrat\initAsSpecimen(), Cronjob\initAsSpecimen(), Delivery\initAsSpecimen(), Don\initAsSpecimen(), EcmFiles\initAsSpecimen(), Entrepot\initAsSpecimen(), Expedition\initAsSpecimen(), ExpenseReport\initAsSpecimen(), Facture\initAsSpecimen(), FactureFournisseur\initAsSpecimen(), FactureFournisseurRec\initAsSpecimen(), FactureRec\initAsSpecimen(), Fichinter\initAsSpecimen(), Holiday\initAsSpecimen(), Loan\initAsSpecimen(), Localtax\initAsSpecimen(), Menubase\initAsSpecimen(), Opensurveysondage\initAsSpecimen(), Paiement\initAsSpecimen(), PaiementFourn\initAsSpecimen(), PaymentDonation\initAsSpecimen(), PaymentExpenseReport\initAsSpecimen(), PaymentSalary\initAsSpecimen(), PaymentSocialContribution\initAsSpecimen(), PaymentVarious\initAsSpecimen(), PaymentVAT\initAsSpecimen(), Product\initAsSpecimen(), Productbatch\initAsSpecimen(), ProductCustomerPrice\initAsSpecimen(), Productlot\initAsSpecimen(), ProductStockEntrepot\initAsSpecimen(), Project\initAsSpecimen(), Propalmergepdfproduct\initAsSpecimen(), Reception\initAsSpecimen(), ReceptionLineBatch\initAsSpecimen(), RemiseCheque\initAsSpecimen(), Salary\initAsSpecimen(), Societe\initAsSpecimen(), Ticket\initAsSpecimen(), Tva\initAsSpecimen(), User\initAsSpecimen(), Website\initAsSpecimen(), WebsitePage\initAsSpecimen(), CommonObject\initAsSpecimenCommon(), InterfaceLogevents\initEventData(), DolibarrModules\insert_cronjobs(), BookKeeping\insertAccountingReversal(), User\isNotIntoValidityDateRange(), Adherent\LibStatut(), Holiday\LibStatut(), User\LibStatut(), FormFile\listOfLinks(), Account\load_board(), Adherent\load_board(), Contrat\load_board(), ExpenseReport\load_board(), Facture\load_board(), FactureFournisseur\load_board(), Holiday\load_board(), Propal\load_board(), RemiseCheque\load_board(), SupplierProposal\load_board(), Ticket\load_board(), box_actions\loadBox(), box_actions_future\loadBox(), box_activity\loadBox(), box_birthdays\loadBox(), box_birthdays_members\loadBox(), box_contracts\loadBox(), box_factures\loadBox(), box_ficheinter\loadBox(), box_graph_invoices_permonth\loadBox(), box_graph_invoices_peryear\loadBox(), box_graph_invoices_supplier_permonth\loadBox(), box_graph_nb_ticket_last_x_days\loadBox(), box_graph_orders_permonth\loadBox(), box_graph_orders_supplier_permonth\loadBox(), box_graph_product_distribution\loadBox(), box_graph_propales_permonth\loadBox(), box_members_by_tags\loadBox(), box_members_by_type\loadBox(), box_propales\loadBox(), box_scheduled_jobs\loadBox(), box_services_contracts\loadBox(), box_services_expired\loadBox(), ActionComm\loadReminders(), CommonInvoice\makeStripeSepaRequest(), Ticket\markAsRead(), migrate_project_task_actors(), migrate_project_user_resp(), migrate_reset_blocked_log(), Ticket\newMessage(), LoanSchedule\paimenttorecord(), ICal\parse(), PriceParser\parseExpression(), RssParser\parser(), Invoices\post(), SupplierInvoices\post(), SupplierOrders\post(), print_paybox_redirect(), Mos\produceAndConsume(), Mos\produceAndConsumeAll(), projectLinesPerDay(), projectLinesPerWeek(), Utils\purgeFiles(), modBlockedLog\remove(), Contrat\reopen(), Cronjob\run_jobs(), InterfaceActionsAuto\runTrigger(), CMailFile\save_dump_mail_in_err(), Form\selectDate(), Notify\send(), ActionComm\sendEmailsReminder(), Facture\sendEmailsRemindersOnInvoiceDueDate(), FactureFournisseur\sendEmailsRemindersOnSupplierInvoiceDueDate(), Adherent\sendReminderForExpiredSubscription(), dolReceiptPrinter\sendToPrinter(), Stripe\sepaStripe(), ExpenseReport\set_cancel(), Societe\set_remise_client(), Societe\set_remise_supplier(), ExpenseReport\setApproved(), Facture\setCanceled(), Fichinter\setClose(), Project\setClose(), Reception\setClosed(), ExpenseReport\setDeny(), Contact\setNoEmail(), Societe\setNoEmail(), Facture\setPaid(), FactureFournisseur\setPaid(), User\setPassword(), Societe\setPriceLevel(), CommonObject\setStatut(), Fichinter\setValid(), ExpenseReport\setValidate(), show_actions_done(), show_array_actions_to_do(), show_array_last_actions_done(), FormActions\showactions(), Account\solde(), Adherent\subscription(), Adherent\subscriptionComplementaryActions(), BookKeeping\transformTransaction(), Cronjob\update(), Dolresource\update(), Link\update(), Product\update(), ProductCustomerPrice\update(), Productlot\update(), ProductStockEntrepot\update(), Salary\update(), Societe\update(), Website\update(), ProductFournisseur\update_buyprice(), ExtraFields\update_label(), User\update_last_login_date(), AssetAccountancyCodes\updateAccountancyCodes(), updateActionComm(), CommonObject\updateCommon(), Thirdparties\updateCompanyBankAccount(), updateContact(), AssetDepreciationOptions\updateDeprecationOptions(), Dolresource\updateElementResource(), Lettering\updateLettering(), FichinterRec\updateNbGenDone(), updateProductOrService(), Contact\updateRoles(), Holiday\updateSoldeCP(), updateThirdParty(), Task\updateTimeSpent(), CashControl\valid(), Commande\valid(), CommandeFournisseur\valid(), Delivery\valid(), Expedition\valid(), Mailing\valid(), Propal\valid(), Reception\valid(), SupplierProposal\valid(), Adherent\validate(), AssetModel\validate(), Availabilities\validate(), BOM\validate(), Calendar\validate(), ConferenceOrBooth\validate(), ConferenceOrBoothAttendee\validate(), Contrat\validate(), Evaluation\validate(), EvaluationLine\validate(), Facture\validate(), FactureFournisseur\validate(), Holiday\validate(), Inventory\validate(), Job\validate(), KnowledgeRecord\validate(), Mo\validate(), MyObject\validate(), Partnership\validate(), Position\validate(), ProductFournisseurPrice\validate(), RecruitmentCandidature\validate(), RecruitmentJobPosition\validate(), Skill\validate(), Skilldet\validate(), SkillRank\validate(), StockTransfer\validate(), StockTransferLine\validate(), Target\validate(), TimeSpent\validate(), BookKeeping\validateMovementForFiscalPeriod(), write_conf_file(), doc_generic_asset_odt\write_file(), doc_generic_bom_odt\write_file(), doc_generic_contract_odt\write_file(), doc_generic_invoice_odt\write_file(), doc_generic_member_odt\write_file(), doc_generic_mo_odt\write_file(), doc_generic_myobject_odt\write_file(), doc_generic_odt\write_file(), doc_generic_order_odt\write_file(), doc_generic_product_odt\write_file(), doc_generic_project_odt\write_file(), doc_generic_proposal_odt\write_file(), doc_generic_reception_odt\write_file(), doc_generic_recruitmentjobposition_odt\write_file(), doc_generic_shipment_odt\write_file(), doc_generic_stock_odt\write_file(), doc_generic_supplier_invoice_odt\write_file(), doc_generic_supplier_order_odt\write_file(), doc_generic_supplier_proposal_odt\write_file(), doc_generic_ticket_odt\write_file(), doc_generic_user_odt\write_file(), doc_generic_usergroup_odt\write_file(), html_cerfafr\write_file(), and pdf_standard\write_file().

◆ dol_osencode()

dol_osencode ( $str)

Return a string encoded into OS filesystem encoding.

This function is used to define value to pass to filesystem PHP functions.

Parameters
string$strString to encode (UTF-8)
Returns
string Encoded string (UTF-8, ISO-8859-1)

Definition at line 10110 of file functions.lib.php.

Referenced by CMailFile\_encode_file(), activateModulesRequiredByCountry(), Product\add_photo(), addFileIntoDatabaseIndex(), CommonObject\addThumbs(), Documents\builddoc(), checkLoginPassEntity(), complete_dictionary_with_modules(), complete_elementList_with_modules(), completeFileArrayWithDatabaseInfo(), Website\createFromClone(), Documents\delete(), EcmDirectory\delete(), Product\delete_photo(), dol_copy(), dol_count_nb_of_line(), dol_delete_dir(), dol_delete_dir_recursive(), dol_delete_file(), dol_dir_is_emtpy(), dol_dir_list(), dol_filemtime(), dol_fileperm(), dol_filesize(), dol_getImageSize(), dol_imageResizeOrCrop(), dol_is_dir(), dol_is_file(), dol_is_link(), dol_is_writable(), dol_move(), dol_move_dir(), dol_move_uploaded_file(), dolCopyDir(), dolReplaceInFile(), Translate\file_exists(), Product\get_image_size(), MailingTargets\getEmailingSelectorsList(), getFromFile(), Translate\getLabelFromNumber(), Interfaces\getTriggersList(), ModeleBoxes\getWidgetsList(), ImportCsv\import_open_file(), Documents\index(), CommonObject\indexFile(), BOM\is_photo_available(), Product\is_photo_available(), Ticket\is_photo_available(), Categorie\isAnyPhotoAvailable(), Product\liste_photos(), listOfSessions(), Translate\load(), Export\load_arrays(), Import\load_arrays(), migrate_product_photospath(), migrate_user_filespath(), migrate_user_photospath(), migrate_user_photospath2(), purgeSessions(), rebuildObjectClass(), rebuildObjectSql(), Interfaces\run_triggers(), Conf\setValues(), and vignette().

◆ dol_print_address()

dol_print_address ( $address,
$htmlid,
$element,
$id,
$noprint = 0,
$charfornl = '' )

Format address string.

Parameters
string$addressAddress string, already formatted with dol_format_address()
int$htmlidHtml ID (for example 'gmap')
int$element'thirdparty'|'contact'|'member'|'user'|'other'
int$idId of object
int$noprintNo output. Result is the function return
string$charfornlChar to use instead of nl2br. '' means we use a standad nl2br.
Returns
string|void Nothing if noprint is 0, formatted address if noprint is 1
See also
dol_format_address()

Definition at line 4462 of file functions.lib.php.

Referenced by WebPortalMember\getBannerAddressForWebPortal().

◆ dol_print_date()

dol_print_date ( $time,
$format = '',
$tzoutput = 'auto',
$outputlangs = null,
$encodetooutput = false )

Output date in a string format according to outputlangs (or langs if not defined).

Return charset is always UTF-8, except if encodetoouput is defined. In this case charset is output charset

Parameters
int | string$timeGM Timestamps date
string$formatOutput date format (tag of strftime function) "%d %b %Y", "%d/%m/%Y %H:%M", "%d/%m/%Y %H:%M:%S", "%B"=Long text of month, "%A"=Long text of day, "%b"=Short text of month, "%a"=Short text of day "day", "daytext", "dayhour", "dayhourldap", "dayhourtext", "dayrfc", "dayhourrfc", "...inputnoreduce", "...reduceformat"
string | bool$tzoutputtrue or 'gmt' => string is for Greenwich location false or 'tzserver' => output string is for local PHP server TZ usage 'tzuser' => output string is for user TZ (current browser TZ with current dst) => In a future, we should have same behaviour than 'tzuserrel' 'tzuserrel' => output string is for user TZ (current browser TZ with dst or not, depending on date position)
Translate$outputlangsObject lang that contains language for text translation.
boolean$encodetooutputfalse=no convert into output pagecode
Returns
string Formatted date or '' if time is null
See also
dol_mktime(), dol_stringtotime(), dol_getdate(), selectDate()

Definition at line 3221 of file functions.lib.php.

Referenced by modAccounting\__construct(), modAdherent\__construct(), modProduct\__construct(), modService\__construct(), modSociete\__construct(), printing_printgcp\__construct(), MouvementStock\_create(), Product\_get_stats(), Adherent\_load_ldap_info(), pdf_azur\_pagehead(), pdf_baleine\_pagehead(), pdf_ban\_pagehead(), pdf_beluga\_pagehead(), pdf_canelle\_pagehead(), pdf_cornas\_pagehead(), pdf_crabe\_pagehead(), pdf_cyan\_pagehead(), pdf_eagle\_pagehead(), pdf_eagle_proforma\_pagehead(), pdf_einstein\_pagehead(), pdf_eratosthene\_pagehead(), pdf_espadon\_pagehead(), pdf_merou\_pagehead(), pdf_muscadet\_pagehead(), pdf_octopus\_pagehead(), pdf_paiement\_pagehead(), pdf_rouget\_pagehead(), pdf_sepamandate\_pagehead(), pdf_soleil\_pagehead(), pdf_sponge\_pagehead(), pdf_squille\_pagehead(), pdf_standard\_pagehead(), pdf_standard\_pagehead(), pdf_standard_asset\_pagehead(), pdf_standard_myobject\_pagehead(), pdf_standard_recruitmentjobposition\_pagehead(), pdf_storm\_pagehead(), pdf_strato\_pagehead(), pdf_timespent\_pagehead(), pdf_typhon\_pagehead(), pdf_vinci\_pagehead(), pdf_zenith\_pagehead(), pdf_standard_actions\_pages(), pdf_aurore\_tableau_info(), pdf_azur\_tableau_info(), pdf_einstein\_tableau_info(), pdf_crabe\_tableau_tot(), pdf_canelle\_tableau_versements(), pdf_crabe\_tableau_versements(), mailing_fraise\add_to_target(), addObjectsToApiFile(), FormCardWebPortal\bodyEdit(), build_calfile(), Export\build_file(), BonPrelevement\buildRumNumber(), CommonInvoice\buildSwitzerlandQRString(), CommonInvoice\buildZATCAQRString(), Asset\calculationDepreciation(), constructGanttLine(), convertSecondToTime(), Ticket\copyFilesForTicket(), BonPrelevement\create(), Facture\create(), FactureFournisseur\create(), Mailing\createFromClone(), Task\createFromClone(), Project\createWeeklyReport(), pdf_octopus\defineColumnField(), CommandeFournisseur\dispatchProduct(), Contrat\doAutoRenewContracts(), doc_getlinedesc(), dol_meta_create(), dol_print_object_info(), dol_time_plus_duree(), dolPrintSignatureImage(), pdf_cyan\drawInfoTable(), pdf_eagle_proforma\drawInfoTable(), pdf_eratosthene\drawInfoTable(), pdf_octopus\drawPaymentsTable(), pdf_sponge\drawPaymentsTable(), pdf_octopus\drawTotalTable(), pdf_sponge\drawTotalTable(), CMailFile\dump_mail(), Utils\dumpDatabase(), Form\editfieldval(), Form\editInPlace(), BonPrelevement\EnregDestinataire(), BonPrelevement\EnregDestinataireSEPA(), BonPrelevement\EnregEmetteur(), BonPrelevement\EnregEmetteurSEPA(), mod_syslog_file\export(), AccountancyExport\exportAgiris(), AccountancyExport\exportBob50(), AccountancyExport\exportCegid(), AccountancyExport\exportCharlemagne(), AccountancyExport\exportCiel(), AccountancyExport\exportCoala(), AccountancyExport\exportCogilog(), AccountancyExport\exportConfigurable(), AccountancyExport\exportEbp(), AccountancyExport\exportFEC(), AccountancyExport\exportFEC2(), AccountancyExport\exportGestimumV3(), AccountancyExport\exportGestimumV5(), AccountancyExport\exportiSuiteExpert(), AccountancyExport\exportLDCompta(), AccountancyExport\exportLDCompta10(), AccountancyExport\exportOpenConcerto(), AccountancyExport\exportQuadratus(), AccountancyExport\exportSAGE50SWISS(), Website\exportWebSite(), AccountancyExport\exportWinfic(), CommonDocGenerator\fill_substitutionarray_with_extrafields(), Form\form_date(), BonPrelevement\generate(), Utils\generateDoc(), CommonDocGenerator\get_substitutionarray_lines(), doc_generic_project_odt\get_substitutionarray_object(), doc_generic_task_odt\get_substitutionarray_object(), CommonDocGenerator\get_substitutionarray_other(), doc_generic_project_odt\get_substitutionarray_project_file(), doc_generic_task_odt\get_substitutionarray_project_file(), doc_generic_project_odt\get_substitutionarray_project_reference(), doc_generic_task_odt\get_substitutionarray_project_reference(), CommonDocGenerator\get_substitutionarray_shipment(), doc_generic_project_odt\get_substitutionarray_task_file(), doc_generic_task_odt\get_substitutionarray_task_file(), doc_generic_project_odt\get_substitutionarray_tasks(), doc_generic_task_odt\get_substitutionarray_tasks(), doc_generic_project_odt\get_substitutionarray_taskstime(), doc_generic_task_odt\get_substitutionarray_taskstime(), CommonDocGenerator\get_substitutionarray_user(), getActionComm(), AccountingJournal\getAssetData(), html_generic\getContents(), getCustomerInvoiceUnpaidOpenTable(), getDefaultDatesForTransfer(), getInvoice(), getInvoicesForThirdParty(), BonPrelevement\getKanbanView(), ChargeSociales\getKanbanView(), Contrat\getKanbanView(), Loan\getKanbanView(), Localtax\getKanbanView(), PaymentExpenseReport\getKanbanView(), PaymentVarious\getKanbanView(), RemiseCheque\getKanbanView(), Subscription\getKanbanView(), SupplierProposal\getKanbanView(), Tva\getKanbanView(), PriceGlobalVariableUpdater\getLastUpdated(), mod_asset_standard\getNextValue(), mod_bom_standard\getNextValue(), mod_chequereceipt_mint\getNextValue(), mod_codeclient_monkey\getNextValue(), mod_commande_fournisseur_muguet\getNextValue(), mod_commande_marbre\getNextValue(), mod_contract_serpis\getNextValue(), mod_delivery_jade\getNextValue(), mod_evaluation_standard\getNextValue(), mod_expedition_safor\getNextValue(), mod_expensereport_jade\getNextValue(), mod_facture_fournisseur_cactus\getNextValue(), mod_facture_mars\getNextValue(), mod_facture_terre\getNextValue(), mod_holiday_madonna\getNextValue(), mod_knowledgerecord_standard\getNextValue(), mod_lot_standard\getNextValue(), mod_member_advanced\getNextValue(), mod_mo_standard\getNextValue(), mod_myobject_standard\getNextValue(), mod_pacific\getNextValue(), mod_partnership_standard\getNextValue(), mod_payment_cicada\getNextValue(), mod_project_simple\getNextValue(), mod_propale_marbre\getNextValue(), mod_reception_beryl\getNextValue(), mod_recruitmentcandidature_standard\getNextValue(), mod_recruitmentjobposition_standard\getNextValue(), mod_sn_standard\getNextValue(), mod_stocktransfer_standard\getNextValue(), mod_supplier_payment_bronan\getNextValue(), mod_supplier_proposal_marbre\getNextValue(), mod_takepos_ref_simple\getNextValue(), mod_task_simple\getNextValue(), mod_ticket_simple\getNextValue(), ActionComm\getNomUrl(), BonPrelevement\getNomUrl(), ConferenceOrBoothAttendee\getNomUrl(), Don\getNomUrl(), FactureFournisseurRec\getNomUrl(), FactureRec\getNomUrl(), Paiement\getNomUrl(), PaiementFourn\getNomUrl(), PaymentExpenseReport\getNomUrl(), PaymentSocialContribution\getNomUrl(), PaymentVAT\getNomUrl(), Subscription\getNomUrl(), getOrder(), getOrdersForThirdParty(), getProductOrService(), getProductsForCategory(), getProject(), getServerTimeZoneInt(), getStructuredData(), CommonDocGenerator\getSubstitutionarrayMember(), getSupplierInvoice(), getSupplierInvoicesForThirdParty(), getThirdParty(), Commande\getTooltipContentArray(), CommandeFournisseur\getTooltipContentArray(), Cronjob\getTooltipContentArray(), Facture\getTooltipContentArray(), FactureFournisseur\getTooltipContentArray(), Fiscalyear\getTooltipContentArray(), Holiday\getTooltipContentArray(), Opensurveysondage\getTooltipContentArray(), PaymentSalary\getTooltipContentArray(), Productlot\getTooltipContentArray(), Project\getTooltipContentArray(), Propal\getTooltipContentArray(), Ticket\getTooltipContentArray(), User\getTooltipContentArray(), getUser(), BordereauChequeBlochet\Header(), DoliDB\idate(), Status\index(), printing_printgcp\listJobs(), box_accountancy_last_manual_entries\loadBox(), box_actions\loadBox(), box_actions_future\loadBox(), box_birthdays\loadBox(), box_birthdays_members\loadBox(), box_boms\loadBox(), box_clients\loadBox(), box_commandes\loadBox(), box_contacts\loadBox(), box_contracts\loadBox(), box_external_rss\loadBox(), box_factures\loadBox(), box_factures_fourn\loadBox(), box_factures_fourn_imp\loadBox(), box_factures_imp\loadBox(), box_ficheinter\loadBox(), box_fournisseurs\loadBox(), box_goodcustomers\loadBox(), box_graph_nb_ticket_last_x_days\loadBox(), box_last_knowledgerecord\loadBox(), box_last_modified_knowledgerecord\loadBox(), box_last_modified_ticket\loadBox(), box_last_ticket\loadBox(), box_lastlogin\loadBox(), box_members_last_modified\loadBox(), box_members_last_subscriptions\loadBox(), box_members_subscriptions_by_year\loadBox(), box_mos\loadBox(), box_produits\loadBox(), box_propales\loadBox(), box_prospect\loadBox(), box_scheduled_jobs\loadBox(), box_services_contracts\loadBox(), box_services_expired\loadBox(), box_supplier_orders\loadBox(), box_supplier_orders_awaiting_reception\loadBox(), Adherent\makeSubstitution(), numero_semaine(), ExpenseReport\offsetAlreadyGiven(), pdf_getlinedesc(), pdf_getLinkedObjects(), print_paybox_redirect(), pdf_standard\printLine(), projectLinesa(), projectLinesPerAction(), report_header(), Cronjob\reprogram_jobs(), InterfaceActionsAuto\runTrigger(), CMailFile\save_dump_mail_in_err(), Form\selectDate(), Facture\sendEmailsRemindersOnInvoiceDueDate(), FactureFournisseur\sendEmailsRemindersOnSupplierInvoiceDueDate(), dolReceiptPrinter\sendToPrinter(), BonPrelevement\set_infocredit(), BonPrelevement\set_infotrans(), vCard\setBirthday(), show_actions_done(), show_bookcal_day_events(), show_contacts(), show_list_sending_receive(), FormActions\showactions(), Commande\showDelay(), CommandeFournisseur\showDelay(), FormFile\showdocuments(), ExtraFields\showOutputField(), FormWebPortal\showOutputFieldForObject(), showWebsiteTemplates(), pdf_standard\tablePayments(), top_menu_user(), treeOutputForAbsoluteDir(), Product\update(), Holiday\updateSoldeCP(), Facture\validate(), ActionsTicket\viewTicketTimelineMessages(), write_conf_file(), doc_generic_asset_odt\write_file(), doc_generic_bom_odt\write_file(), doc_generic_contract_odt\write_file(), doc_generic_invoice_odt\write_file(), doc_generic_member_odt\write_file(), doc_generic_mo_odt\write_file(), doc_generic_myobject_odt\write_file(), doc_generic_odt\write_file(), doc_generic_order_odt\write_file(), doc_generic_product_odt\write_file(), doc_generic_project_odt\write_file(), doc_generic_proposal_odt\write_file(), doc_generic_reception_odt\write_file(), doc_generic_recruitmentjobposition_odt\write_file(), doc_generic_shipment_odt\write_file(), doc_generic_stock_odt\write_file(), doc_generic_supplier_invoice_odt\write_file(), doc_generic_supplier_order_odt\write_file(), doc_generic_supplier_proposal_odt\write_file(), doc_generic_ticket_odt\write_file(), doc_generic_user_odt\write_file(), doc_generic_usergroup_odt\write_file(), html_cerfafr\write_file(), pdf_baleine\write_file(), pdf_beluga\write_file(), pdf_paiement\write_file(), pdf_soleil\write_file(), pdf_standard\write_file(), pdf_standard\write_file(), pdf_strato\write_file(), and pdf_timespent\write_file().

◆ dol_print_email()

dol_print_email ( $email,
$cid = 0,
$socid = 0,
$addlink = 0,
$max = 64,
$showinvalid = 1,
$withpicto = 0 )

Show EMail link formatted for HTML output.

Parameters
string$emailEMail to show (only email, without 'Name of recipient' before)
int$cidId of contact if known
int$socidId of third party if known
int$addlink0=no link, 1=email has a html email link (+ link to create action if constant AGENDA_ADDACTIONFOREMAIL is on)
int$maxMax number of characters to show
int$showinvalid1=Show warning if syntax email is wrong
int | string$withpictoShow picto
Returns
string HTML Link

Definition at line 3735 of file functions.lib.php.

Referenced by ActionsAdherentCardCommon\assign_values(), ActionsCardCommon\assign_values(), ActionsContactCardCommon\assign_values(), Form\editfieldval(), WebPortalMember\getBannerAddressForWebPortal(), box_last_modified_ticket\loadBox(), box_last_ticket\loadBox(), ExtraFields\showOutputField(), and FormWebPortal\showOutputFieldForObject().

◆ dol_print_error()

dol_print_error ( $db = null,
$error = '',
$errors = null )

Displays error message system with all the information to facilitate the diagnosis and the escalation of the bugs.

This function must be called when a blocking technical error is encountered. However, one must try to call it only within php pages, classes must return their error through their property "error".

Parameters
DoliDB | null$dbDatabase handler
string | string[]$errorString or array of errors strings to show
string[] | null$errorsArray of errors
Returns
void
See also
dol_htmloutput_errors()

Definition at line 5815 of file functions.lib.php.

Referenced by mailing_thirdparties_services_expired\__construct(), modAgenda\__construct(), MouvementStock\_create(), Stats\_getAllByProduct(), Stats\_getAllByYear(), Stats\_getAmountByMonth(), Stats\_getAverageByMonth(), Stats\_getNbByMonth(), Stats\_getNbByYear(), Product\_log_price(), pdf_standard\_pagehead(), Product\add_sousproduit(), mailing_contacts1\add_to_target(), addDocumentModel(), Account\addline(), ActionsStripeconnect\addMoreActionsButtons(), Localtax\addPayment(), Tva\addPayment(), Paiement\addPaymentToBank(), PaymentDonation\addPaymentToBank(), PaymentExpenseReport\addPaymentToBank(), PaymentLoan\addPaymentToBank(), PaymentSalary\addPaymentToBank(), PaymentSocialContribution\addPaymentToBank(), PaymentVAT\addPaymentToBank(), User\addrights(), UserGroup\addrights(), MailingTargets\addTargetsToDatabase(), Task\addTimeSpent(), ajouter_sondage(), BlockedLog\alreadyUsed(), Partnership\approve(), ActionsAdherentCardCommon\assign_post(), ActionsContactCardCommon\assign_post(), ProductAttribute\attributeOrder(), Export\build_filterField(), calcul_price_total(), MouvementStock\calculateBalanceForProductBefore(), CommonObject\call_trigger(), Account\can_be_deleted(), Stripe\cardStripe(), BonPrelevement\checkIfSalaryBonPrelevement(), checkUserAccessToObject(), chequereceipt_pdf_create(), CommandeFournisseur\classifyBilled(), clean_data_ecm_directories(), cleanCorruptedTree(), DoliDBMysqli\connect(), Form\constructProductListOption(), Societe\contact_array(), Societe\contact_array_objects(), Societe\contact_get_property(), contact_prepare_head(), Societe\contact_property_array(), Categorie\containing(), Account\countAccountToReconcile(), Categorie\countNbOfCategories(), Commande\countNbOfShipments(), Commande\create(), CommandeFournisseur\create(), Contrat\create(), Facture\create(), FactureFournisseur\create(), Fichinter\create(), Menubase\create(), PaymentVarious\create(), Propal\create(), SupplierProposal\create(), Holiday\createCPusers(), createNewDictionnary(), Mo\createProduction(), FactureFournisseurRec\createRecurringInvoices(), FactureRec\createRecurringInvoices(), Project\createWeeklyReport(), Stripe\customerStripe(), Product\del_sousproduit(), delDocumentModel(), BonPrelevement\delete(), DiscountAbsolute\delete(), PaymentLoan\delete(), ExtraFields\delete_label(), Facture\deleteLine(), User\delrights(), UserGroup\delrights(), doc_label_pdf_create(), dol_dir_list_in_database(), dol_set_user_param(), dolibarr_del_const(), dolibarr_set_const(), dolSavePageContent(), dolSessionWrite(), FormListWebPortal\elementList(), facture_prepare_head(), facturefourn_prepare_head(), Bookmark\fetch(), Categorie\fetch(), CommandeFournisseurLigne\fetch(), CompanyBankAccount\fetch(), Don\fetch(), ExpenseReportLine\fetch(), Export\fetch(), Import\fetch(), Notify\fetch(), Paiement\fetch(), PaiementFourn\fetch(), SupplierProposalLine\fetch(), Ticket\fetch(), UserBankAccount\fetch(), CommonObject\fetch_barcode(), Opensurveysondage\fetch_lines(), Adherent\fetch_login(), Adherent\fetch_name(), ActionComm\fetch_userassigned(), EmailCollector\fetchActions(), ExpeditionLineBatch\fetchAll(), ProductAttribute\fetchAll(), Task\fetchAllTimeSpent(), EmailCollector\fetchFilters(), CommonObject\fetchObjectLinked(), ActionComm\fetchResources(), Task\fetchTimeSpentOnTask(), CommonObject\fetchValuesForExtraLanguages(), fichinter_create(), FormCompany\form_prospect_level(), mailing_advthirdparties\formFilter(), mailing_contacts1\formFilter(), mailing_fraise\formFilter(), mailing_partnership\formFilter(), mailing_thirdparties\formFilter(), FormCompany\formProspectContactLevel(), Utils\generateDoc(), Don\generateDocument(), Societe\generateDocument(), RemiseCheque\generatePdf(), Categorie\get_all_categories(), FactureLigne\get_allprev_progress(), User\get_children(), Project\get_element_list(), Categorie\get_filles(), FormMail\get_form(), Categorie\get_full_arbo(), EcmDirectory\get_full_arbo(), Entrepot\get_full_arbo(), User\get_full_tree(), get_left_menu_accountancy(), Categorie\get_meres(), get_next_value(), FactureLigne\get_prev_progress(), Account\get_url(), Fiscalyear\getAccountancyEntriesByFiscalYear(), Fiscalyear\getAccountancyMovementsByFiscalYear(), ExpenseReportIk\getAllRanges(), ExpenseReportRule\getAllRule(), MouvementStock\getBatchCount(), CommonObject\getCanvas(), AccountancyCategory\getCats(), Project\getChildren(), Product\getChildsArbo(), Contact\getContactRoles(), Societe\getContacts(), getCountriesInEEC(), getCountry(), AccountancyCategory\getCptsCat(), getCustomerInvoiceDraftTable(), getCustomerInvoiceLatestEditTable(), getCustomerInvoiceUnpaidOpenTable(), getCustomerOrderPieChart(), getCustomerProposalPieChart(), CommandeFournisseur\getDispachedLines(), getDraftSupplierTable(), ExpenseReportLine\getExpAmount(), Product\getFather(), ActionsCardProduct\getFieldListCanvas(), ActionsCardService\getFieldListCanvas(), CommandeFournisseur\getInputMethod(), Evaluation\getLastEvaluationForUser(), CommonInvoice\getListIdAvoirFromInvoice(), InterfaceNotification\getListOfManagedEvents(), getListOfModels(), CommonInvoice\getListOfPayments(), ExpenseReportIk\getMaxRangeNumber(), modStockTransfer\getNextId(), Asset\getNextNumRef(), Availabilities\getNextNumRef(), BOM\getNextNumRef(), Calendar\getNextNumRef(), Commande\getNextNumRef(), CommandeFournisseur\getNextNumRef(), ConferenceOrBoothAttendee\getNextNumRef(), Contrat\getNextNumRef(), Evaluation\getNextNumRef(), EvaluationLine\getNextNumRef(), Expedition\getNextNumRef(), ExpenseReport\getNextNumRef(), Facture\getNextNumRef(), FactureFournisseur\getNextNumRef(), Fichinter\getNextNumRef(), Holiday\getNextNumRef(), Job\getNextNumRef(), KnowledgeRecord\getNextNumRef(), Mo\getNextNumRef(), MyObject\getNextNumRef(), Paiement\getNextNumRef(), PaiementFourn\getNextNumRef(), Partnership\getNextNumRef(), Position\getNextNumRef(), ProductFournisseurPrice\getNextNumRef(), Propal\getNextNumRef(), Reception\getNextNumRef(), RecruitmentCandidature\getNextNumRef(), RecruitmentJobPosition\getNextNumRef(), RemiseCheque\getNextNumRef(), Skill\getNextNumRef(), Skilldet\getNextNumRef(), SkillRank\getNextNumRef(), StockTransfer\getNextNumRef(), StockTransferLine\getNextNumRef(), SupplierProposal\getNextNumRef(), Target\getNextNumRef(), TimeSpent\getNextNumRef(), Workstation\getNextNumRef(), mod_expensereport_jade\getNextValue(), mod_facture_fournisseur_cactus\getNextValue(), mod_facture_mars\getNextValue(), mod_facture_terre\getNextValue(), mod_takepos_ref_simple\getNextValue(), getNumberInvoicesPieChart(), Stripe\getPaymentIntent(), BlockedLog\getPreviousHash(), Project\getProjectsAuthorizedForUser(), getPurchaseInvoiceLatestEditTable(), getPurchaseInvoiceUnpaidOpenTable(), ExpenseReportIk\getRangesByCategory(), Don\getRemainToPay(), Societe\getSalesRepresentatives(), getServerTimeZoneInt(), Job\getSkillRankForJob(), getSourceDocRef(), getState(), Stripe\getStripeAccount(), CommonInvoice\getSubtypeLabel(), DiscountAbsolute\getSumCreditNotesUsed(), DiscountAbsolute\getSumDepositsUsed(), DiscountAbsolute\getSumFromThisCreditNotesNotUsed(), Task\getSummaryOfTimeSpent(), Task\getSumOfAmount(), Task\getTasksArray(), ExpenseReportIk\getTaxCategories(), Holiday\getTypes(), Task\getUserRolesForProjectsOrTasks(), ImportCsv\import_insert(), ImportXlsx\import_insert(), CommonObject\indexFile(), AccountingAccount\info(), ActionComm\info(), Adherent\info(), Asset\info(), AssetModel\info(), Availabilities\info(), BOM\info(), BOMLine\info(), Calendar\info(), ChargeSociales\info(), Commande\info(), CommandeFournisseur\info(), CompanyPaymentMode\info(), ConferenceOrBooth\info(), ConferenceOrBoothAttendee\info(), Contrat\info(), CTicketCategory\info(), Deplacement\info(), Don\info(), EmailCollector\info(), EmailCollectorAction\info(), EmailCollectorFilter\info(), EmailSenderProfile\info(), Entrepot\info(), Establishment\info(), Evaluation\info(), EvaluationLine\info(), ExpenseReport\info(), Facture\info(), FactureFournisseur\info(), FactureRec\info(), Fichinter\info(), Fiscalyear\info(), Holiday\info(), Hook\info(), Inventory\info(), Job\info(), KnowledgeRecord\info(), Mo\info(), MyObject\info(), Paiement\info(), PaiementFourn\info(), Partnership\info(), PartnershipType\info(), PaymentExpenseReport\info(), PaymentVarious\info(), Position\info(), Product\info(), ProductFournisseurPrice\info(), Project\info(), Propal\info(), RecruitmentCandidature\info(), RecruitmentJobPosition\info(), Salary\info(), Skill\info(), Skilldet\info(), SkillRank\info(), Societe\info(), SocieteAccount\info(), StockTransfer\info(), StockTransferLine\info(), Subscription\info(), SupplierProposal\info(), Target\info(), TimeSpent\info(), Tva\info(), User\info(), Workstation\info(), modEmailCollector\init(), FichinterLigne\insert(), DolibarrModules\insert_permissions(), Product\is_sousproduit(), CommonObject\isObjectUsed(), Product\isVariant(), CommonObject\line_order(), Export\list_export_model(), Fournisseur\ListArray(), Commande\liste_array(), Facture\liste_array(), Propal\liste_array(), SupplierProposal\liste_array(), CommonObject\liste_contact(), Ticket\listeContact(), Deplacement\listOfTypes(), ExpenseReport\listOfTypes(), mod_barcode_product_standard\literalBarcodeType(), mod_barcode_thirdparty_standard\literalBarcodeType(), Translate\load(), Account\load_board(), ActionComm\load_board(), Adherent\load_board(), Contrat\load_board(), ExpenseReport\load_board(), Facture\load_board(), FactureFournisseur\load_board(), Holiday\load_board(), RemiseCheque\load_board(), Form\load_cache_availability(), Form\load_cache_conditions_paiements(), Form\load_cache_invoice_subtype(), Form\load_cache_transport_mode(), Form\load_cache_types_fees(), Form\load_cache_types_paiements(), Categorie\load_motherof(), EcmDirectory\load_motherof(), CommonObject\load_previous_next_ref(), Product\load_virtual_stock(), Product\loadBatchInfo(), box_activity\loadBox(), box_funnel_of_prospection\loadBox(), box_graph_nb_ticket_last_x_days\loadBox(), box_graph_nb_tickets_type\loadBox(), box_graph_new_vs_close_ticket\loadBox(), box_graph_ticket_by_severity\loadBox(), box_last_knowledgerecord\loadBox(), box_last_modified_knowledgerecord\loadBox(), box_last_modified_ticket\loadBox(), box_last_ticket\loadBox(), box_task\loadBox(), box_validated_projects\loadBox(), Ticket\loadCacheCategoriesTickets(), Dolresource\loadCacheCodeTypeResource(), Translate\loadCacheCurrencies(), Form\loadCacheInputReason(), Ticket\loadCacheSeveritiesTickets(), Ticket\loadCacheTypesTickets(), User\loadDefaultValues(), Translate\loadFromDatabase(), FormProduct\loadLotStock(), User\loadParentOf(), Account\loadStateBoard(), Adherent\loadStateBoard(), Client\loadStateBoard(), Commande\loadStateBoard(), CommandeFournisseur\loadStateBoard(), Contact\loadStateBoard(), Contrat\loadStateBoard(), Dolresource\loadStateBoard(), Don\loadStateBoard(), ExpenseReport\loadStateBoard(), Facture\loadStateBoard(), FactureFournisseur\loadStateBoard(), Fichinter\loadStateBoard(), Fournisseur\loadStateBoard(), Holiday\loadStateBoard(), Product\loadStateBoard(), Project\loadStateBoard(), Propal\loadStateBoard(), RemiseCheque\loadStateBoard(), SupplierProposal\loadStateBoard(), Task\loadStateBoard(), Ticket\loadStateBoard(), User\loadStateBoard(), Project\loadTimeSpent(), Project\loadTimeSpentMonth(), FormProduct\loadWarehouses(), FormProduct\loadWorkstations(), CommonInvoice\makeStripeSepaRequest(), Invoices\markAsCreditAvailable(), member_prepare_head(), members_card_pdf_create(), Menubase\menuLoad(), migrate_actioncomm_element(), migrate_categorie_association(), migrate_commande_deliveryaddress(), migrate_commande_expedition(), migrate_commande_livraison(), migrate_contacts_socialnetworks(), migrate_contractdet_rank(), migrate_contracts_date1(), migrate_contracts_date2(), migrate_contracts_date3(), migrate_contracts_det(), migrate_contracts_open(), migrate_customerorder_shipping(), migrate_detail_livraison(), migrate_element_time(), migrate_event_assignement(), migrate_event_assignement_contact(), migrate_export_import_profiles(), migrate_links_transfert(), migrate_members_socialnetworks(), migrate_menus(), migrate_mode_reglement(), migrate_modeles(), migrate_paiements(), migrate_paiements_orphelins_1(), migrate_paiements_orphelins_2(), migrate_project_task_actors(), migrate_project_user_resp(), migrate_relationship_tables(), migrate_remise_entity(), migrate_remise_except_entity(), migrate_reset_blocked_log(), migrate_restore_missing_links(), migrate_shipping_delivery(), migrate_shipping_delivery2(), migrate_stocks(), migrate_thirdparties_socialnetworks(), migrate_user_rights_entity(), migrate_usergroup_rights_entity(), migrate_users_socialnetworks(), FormAdvTargetEmailing\multiselectCivility(), FormAdvTargetEmailing\multiselectCountry(), FormAdvTargetEmailing\multiselectProspectionStatus(), FormAdvTargetEmailing\multiselectselectSalesRepresentatives(), FormAdvTargetEmailing\multiselectState(), ExpenseReport\offsetAlreadyGiven(), ordered(), pdf_bank(), print_left_auguria_menu(), print_paybox_redirect(), printDropdownBookmarksList(), printing_printipp\printFile(), CommonObject\printObjectLine(), project_prepare_head(), pt(), rebuild_merge_pdf(), rebuildObjectClass(), recruitmentjobpositionPrepareHead(), Contrat\reopen(), security_prepare_head(), FormAccounting\select_accounting_category(), Form\select_all_categories(), Form\select_bom(), FormCompany\select_civility(), Form\select_comptes(), FormContract\select_contract(), Form\select_country(), Form\select_dolgroups(), Form\select_dolusers(), FormProjets\select_element(), Form\select_export_model(), Form\select_incoterms(), FormIntervention\select_interventions(), FormCompany\select_juridicalstatus(), FormAdmin\select_paper_format(), Form\select_product_fourn_price(), Form\select_produits_fournisseurs_list(), Form\select_produits_list(), FormProjets\select_projects_list(), FormCompany\select_region(), Form\select_remises(), FormResource\select_resource_list(), FormCompany\select_state(), FormResource\select_state(), Form\select_thirdparty_list(), FormSocialContrib\select_type_socialcontrib(), FormAdvTargetEmailing\selectAdvtargetemailingTemplate(), FormBarCode\selectBarcodeType(), FormCompany\selectCompaniesForNewContact(), Form\selectcontacts(), Form\selectEstablishments(), FormWebPortal\selectForFormsList(), FormTicket\selectGroupTickets(), FormOrder\selectInputMethod(), FormProjets\selectInvoiceAndLine(), FormProduct\selectMeasuringUnits(), FormCategory\selectProductCategory(), FormProduct\selectProductNature(), FormPropal\selectProposalStatus(), Form\selectShippingMethod(), FormProjets\selectTasks(), FormWebsite\selectWebsite(), Notify\send(), CSMSFile\sendfile(), DataPolicy\sendMailDataPolicyAdherent(), DataPolicy\sendMailDataPolicyCompany(), DataPolicy\sendMailDataPolicyContact(), Stripe\sepaStripe(), FichinterRec\set_auto(), Don\set_cancel(), Commande\set_reopen(), CompanyPaymentMode\setAsDefault(), FactureFournisseurRec\setAutoValidate(), FactureRec\setAutoValidate(), FichinterRec\setAutoValidate(), Expedition\setClosed(), Reception\setClosed(), CommonObject\setDocModel(), Context\setEventMessages(), FactureRec\setFrequencyAndUnit(), FichinterRec\setFrequencyAndUnit(), FactureFournisseurRec\setGeneratePdf(), FactureRec\setGeneratePdf(), FactureFournisseurRec\setMaxPeriod(), FactureRec\setMaxPeriod(), FichinterRec\setMaxPeriod(), FactureFournisseurRec\setModelPdf(), FactureRec\setModelPdf(), FactureRec\setNextDate(), FichinterRec\setNextDate(), Don\setPaid(), ExpenseReport\setPaid(), FactureFournisseur\setPaid(), Adherent\setPassword(), User\setPassword(), Societe\setPriceLevel(), CommonObject\setProject(), Facture\setUnpaid(), FactureFournisseur\setUnpaid(), Fichinter\setValid(), show_actions_done(), show_array_actions_to_do(), show_array_last_actions_done(), show_contacts(), show_contacts_projects(), FormSms\show_form(), show_list_sending_receive(), show_projects(), show_stats_for_batch(), show_stats_for_company(), FormActions\showactions(), FormFile\showdocuments(), Form\showLinkToObjectBlock(), societe_prepare_head(), CommonObject\swapContactStatus(), task_prepare_head(), tax_by_rate(), tax_by_thirdparty(), Account\update(), Categorie\update(), ExpenseReportLine\update(), Product\update(), Account\update_bban(), Localtax\update_fk_bank(), PaymentVarious\update_fk_bank(), Salary\update_fk_bank(), Tva\update_fk_bank(), ExtraFields\update_label(), Product\update_sousproduit(), ProductAttribute\updateAttributePositionDown(), ProductAttribute\updateAttributePositionUp(), CommonObject\updateLineDown(), CommonObject\updateLineUp(), FichinterRec\updateNbGenDone(), ProductAttribute\updatePositionOfAttribute(), CommonObject\updateRangOfLine(), User\user_get_property(), user_prepare_head(), Commande\valid(), CommandeFournisseur\valid(), Delivery\valid(), Propal\valid(), SupplierProposal\valid(), AssetModel\validate(), Availabilities\validate(), BOM\validate(), Calendar\validate(), ConferenceOrBooth\validate(), ConferenceOrBoothAttendee\validate(), Contrat\validate(), Evaluation\validate(), EvaluationLine\validate(), Job\validate(), KnowledgeRecord\validate(), Mo\validate(), MyObject\validate(), Partnership\validate(), Position\validate(), ProductFournisseurPrice\validate(), RecruitmentCandidature\validate(), RecruitmentJobPosition\validate(), Skill\validate(), Skilldet\validate(), SkillRank\validate(), StockTransfer\validate(), StockTransferLine\validate(), Target\validate(), TimeSpent\validate(), Holiday\verifDateHolidayCP(), Holiday\verifDateHolidayForTimestamp(), ActionsTicket\viewTicketMessages(), Facture\willBeLastOfSameType(), doc_generic_asset_odt\write_file(), doc_generic_bom_odt\write_file(), doc_generic_contract_odt\write_file(), doc_generic_invoice_odt\write_file(), doc_generic_member_odt\write_file(), doc_generic_mo_odt\write_file(), doc_generic_myobject_odt\write_file(), doc_generic_order_odt\write_file(), doc_generic_product_odt\write_file(), doc_generic_project_odt\write_file(), doc_generic_proposal_odt\write_file(), doc_generic_reception_odt\write_file(), doc_generic_recruitmentjobposition_odt\write_file(), doc_generic_shipment_odt\write_file(), doc_generic_stock_odt\write_file(), doc_generic_supplier_proposal_odt\write_file(), doc_generic_task_odt\write_file(), doc_generic_ticket_odt\write_file(), doc_generic_user_odt\write_file(), doc_generic_usergroup_odt\write_file(), pdf_paiement\write_file(), pdf_standard\write_file(), pdf_standard\write_file(), pdf_standardlabel\write_file(), pdf_tcpdflabel\write_file(), ExportCsv\write_record(), ExportExcel2007\write_record(), ExportTsv\write_record(), and ExportExcel2007\write_title().

◆ dol_print_error_email()

dol_print_error_email ( $prefixcode,
$errormessage = '',
$errormessages = array(),
$morecss = 'error',
$email = '' )

Show a public email and error code to contact if technical error.

Parameters
string$prefixcodePrefix of public error code
string$errormessageComplete error message
string[]$errormessagesArray of error messages
string$morecssMore css
string$emailEmail
Returns
void

Definition at line 5967 of file functions.lib.php.

◆ dol_print_ip()

dol_print_ip ( $ip,
$mode = 0 )

Return an IP formatted to be shown on screen.

Parameters
string$ipIP
int$mode0=return IP + country/flag, 1=return only country/flag, 2=return only IP
Returns
string Formatted IP, with country if GeoIP module is enabled

Definition at line 4328 of file functions.lib.php.

Referenced by ExtraFields\showOutputField(), and FormWebPortal\showOutputFieldForObject().

◆ dol_print_phone()

dol_print_phone ( $phone,
$countrycode = '',
$cid = 0,
$socid = 0,
$addlink = '',
$separ = "&nbsp;",
$withpicto = '',
$titlealt = '',
$adddivfloat = 0,
$morecss = '' )

Format phone numbers according to country.

Parameters
string$phonePhone number to format
string$countrycodeCountry code to use for formatting
int$cidId of contact if known
int$socidId of third party if known
string$addlink''=no link to create action, 'AC_TEL'=add link to clicktodial (if module enabled) and add link to create event (if conf->global->AGENDA_ADDACTIONFORPHONE set), 'tel'=Force "tel:..." link
string$separSeparation between numbers for a better visibility example : xx.xx.xx.xx.xx. You can also use 'hidenum' to hide the number, keep only the picto.
string$withpictoShow picto ('fax', 'phone', 'mobile')
string$titlealtText to show on alt
int$adddivfloatAdd div float around phone.
string$morecssAdd more css
Returns
string Formatted phone number

Definition at line 3996 of file functions.lib.php.

Referenced by ActionsAdherentCardCommon\assign_values(), ActionsCardCommon\assign_values(), ActionsContactCardCommon\assign_values(), Form\editfieldval(), WebPortalMember\getBannerAddressForWebPortal(), Project\getKanbanView(), Contact\getTooltipContentArray(), Societe\getTooltipContentArray(), User\getTooltipContentArray(), ExtraFields\showOutputField(), and FormWebPortal\showOutputFieldForObject().

◆ dol_print_profids()

dol_print_profids ( $profID,
$profIDtype,
$countrycode = '',
$addcpButton = 1 )

Format professional IDs according to their country.

Parameters
string$profIDValue of profID to format
string$profIDtypeType of profID to format ('1', '2', '3', '4', '5', '6' or 'VAT')
string$countrycodeCountry code to use for formatting
int<0,2>$addcpButton Add button to copy to clipboard (1 => show only on hoover ; 2 => always display )
Returns
string Formatted profID

Definition at line 3939 of file functions.lib.php.

Referenced by top_menu_user().

◆ dol_print_size()

dol_print_size ( $size,
$shortvalue = 0,
$shortunit = 0 )

Return string with formatted size.

Parameters
int$sizeSize to print
int$shortvalueTell if we want long value to use another unit (Ex: 1.5Kb instead of 1500b)
int$shortunitUse short label of size unit (for example 'b' instead of 'bytes')
Returns
string Link

Definition at line 3649 of file functions.lib.php.

Referenced by DolMemoryCollector\collect(), FormFile\list_of_autoecmfiles(), and FormFile\list_of_documents().

◆ dol_print_socialnetworks()

dol_print_socialnetworks ( $value,
$cid,
$socid,
$type,
$dictsocialnetworks = array() )

Show social network link.

Parameters
string$valueSocial network ID to show (only skype, without 'Name of recipient' before)
int$cidId of contact if known
int$socidId of third party if known
string$type'skype','facebook',...
array<string,array{rowid:int,label:string,url:string,icon:string,active:int}>$dictsocialnetworks List of socialnetworks available
Returns
string HTML Link

Definition at line 3852 of file functions.lib.php.

◆ dol_print_url()

dol_print_url ( $url,
$target = '_blank',
$max = 32,
$withpicto = 0,
$morecss = '' )

Show Url link.

Parameters
string$urlUrl to show
string$targetTarget for link
int$maxMax number of characters to show
int$withpictoWith picto
string$morecssMore CSS
Returns
string HTML Link

Definition at line 3688 of file functions.lib.php.

Referenced by ActionsCardCommon\assign_values(), Form\editfieldval(), WebPortalMember\getBannerAddressForWebPortal(), ExtraFields\showOutputField(), and FormWebPortal\showOutputFieldForObject().

◆ dol_sanitizeEmail()

dol_sanitizeEmail ( $stringtoclean)

Clean a string to use it as an Email.

Parameters
string$stringtocleanString to clean. Example 'abc@m.nosp@m.ycom.nosp@m.pany..nosp@m.com <My name>'
Returns
string Escaped string.

Definition at line 1632 of file functions.lib.php.

Referenced by CMailFile\__construct().

◆ dol_sanitizeFileName()

dol_sanitizeFileName ( $str,
$newstr = '_',
$unaccent = 1 )

Clean a string to use it as a file name.

Replace also '–' and ' -' strings, they are used for parameters separation (Note: ' - ' is allowed).

Parameters
string$strString to clean
string$newstrString to replace bad chars with.
int$unaccent1=Remove also accent (default), 0 do not remove them
Returns
string String cleaned (a-zA-Z_)
See also
dol_string_nospecial(), dol_string_unaccent(), dol_sanitizePathName()

Definition at line 1548 of file functions.lib.php.

Referenced by FileUpload\__construct(), account_statement_prepare_head(), CommandeFournisseur\approve(), Partnership\approve(), assetPrepareHead(), availabilitiesPrepareHead(), bank_prepare_head(), bomPrepareHead(), calendarPrepareHead(), Expedition\cancel(), Product\check(), clean_data_ecm_directories(), commande_prepare_head(), CommonObject\commonGenerateDocument(), conferenceorboothPrepareHead(), contact_prepare_head(), contract_prepare_head(), EcmDirectory\create(), Expedition\create(), Product\create(), ProductAttribute\create(), ProductAttributeValue\create(), Reception\create(), Project\createFromClone(), Task\createFromClone(), Website\createFromClone(), WebsitePage\createFromClone(), Commande\delete(), CommandeFournisseur\delete(), Contrat\delete(), Delivery\delete(), Dolresource\delete(), Expedition\delete(), ExpenseReport\delete(), Facture\delete(), FactureFournisseur\delete(), Fichinter\delete(), Product\delete(), Project\delete(), Propal\delete(), Reception\delete(), SupplierProposal\delete(), Task\delete(), delivery_prepare_head(), dol_add_file_process(), dol_delete_preview(), dol_meta_create(), dol_uncompress(), donation_prepare_head(), Utils\dumpDatabase(), FormListWebPortal\elementList(), evaluationPrepareHead(), expensereport_prepare_head(), AccountancyExport\exportFEC(), AccountancyExport\exportFEC2(), AccountancyExport\exportQuadratus(), facture_prepare_head(), fichinter_prepare_head(), Thirdparties\generateBankAccountDocument(), Setup\getCheckIntegrity(), FormWebsite\getContentPageTemplate(), getCustomerInvoiceLatestEditTable(), getCustomerInvoiceUnpaidOpenTable(), Documents\getDocumentsListByElement(), Asset\getNomUrl(), AssetModel\getNomUrl(), Availabilities\getNomUrl(), Calendar\getNomUrl(), ConferenceOrBooth\getNomUrl(), ConferenceOrBoothAttendee\getNomUrl(), Evaluation\getNomUrl(), EvaluationLine\getNomUrl(), Job\getNomUrl(), KnowledgeRecord\getNomUrl(), MyObject\getNomUrl(), Partnership\getNomUrl(), PartnershipType\getNomUrl(), Position\getNomUrl(), ProductAttribute\getNomUrl(), ProductFournisseurPrice\getNomUrl(), RecruitmentCandidature\getNomUrl(), RecruitmentJobPosition\getNomUrl(), Skill\getNomUrl(), Skilldet\getNomUrl(), SkillRank\getNomUrl(), StockTransfer\getNomUrl(), StockTransferLine\getNomUrl(), Target\getNomUrl(), TimeSpent\getNomUrl(), WebPortalPartnership\getNomUrl(), Workstation\getNomUrl(), getPurchaseInvoiceLatestEditTable(), EcmDirectory\getRelativePath(), holiday_prepare_head(), modAi\init(), modMyModule\init(), modPartnership\init(), jobPrepareHead(), knowledgerecordPrepareHead(), FormFile\list_of_documents(), loan_prepare_head(), migrate_product_photospath(), moPrepareHead(), myobjectPrepareHead(), ordersupplier_prepare_head(), partnershipPrepareHead(), positionCardPrepareHead(), Documents\post(), product_prepare_head(), productlot_prepare_head(), project_prepare_head(), propal_prepare_head(), reception_prepare_head(), recruitmentCandidaturePrepareHead(), recruitmentjobpositionPrepareHead(), resource_prepare_head(), Notify\send(), Fichinter\setValid(), ExpenseReport\setValidate(), Conf\setValues(), shipping_prepare_head(), skilldetPrepareHead(), skillPrepareHead(), skillrankPrepareHead(), stocktransferPrepareHead(), task_prepare_head(), tax_prepare_head(), FileUpload\trimFileName(), Account\update(), Dolresource\update(), Product\update(), ProductAttribute\update(), ProductAttributeValue\update(), Project\update(), Societe\update(), Task\update(), Commande\valid(), CommandeFournisseur\valid(), Delivery\valid(), Expedition\valid(), Propal\valid(), Reception\valid(), SupplierProposal\valid(), Availabilities\validate(), BOM\validate(), Calendar\validate(), ConferenceOrBoothAttendee\validate(), Contrat\validate(), Evaluation\validate(), EvaluationLine\validate(), Facture\validate(), FactureFournisseur\validate(), Holiday\validate(), Job\validate(), KnowledgeRecord\validate(), Mo\validate(), MyObject\validate(), Partnership\validate(), Position\validate(), ProductFournisseurPrice\validate(), RecruitmentCandidature\validate(), RecruitmentJobPosition\validate(), Skill\validate(), Skilldet\validate(), SkillRank\validate(), StockTransfer\validate(), StockTransferLine\validate(), Target\validate(), TimeSpent\validate(), various_payment_prepare_head(), vat_prepare_head(), workstationPrepareHead(), doc_generic_asset_odt\write_file(), doc_generic_bom_odt\write_file(), doc_generic_contract_odt\write_file(), doc_generic_invoice_odt\write_file(), doc_generic_member_odt\write_file(), doc_generic_mo_odt\write_file(), doc_generic_myobject_odt\write_file(), doc_generic_odt\write_file(), doc_generic_order_odt\write_file(), doc_generic_product_odt\write_file(), doc_generic_project_odt\write_file(), doc_generic_proposal_odt\write_file(), doc_generic_reception_odt\write_file(), doc_generic_recruitmentjobposition_odt\write_file(), doc_generic_shipment_odt\write_file(), doc_generic_stock_odt\write_file(), doc_generic_supplier_invoice_odt\write_file(), doc_generic_supplier_order_odt\write_file(), doc_generic_supplier_proposal_odt\write_file(), doc_generic_task_odt\write_file(), doc_generic_ticket_odt\write_file(), doc_generic_user_odt\write_file(), doc_generic_usergroup_odt\write_file(), html_cerfafr\write_file(), html_generic\write_file(), pdf_aurore\write_file(), pdf_azur\write_file(), pdf_baleine\write_file(), pdf_ban\write_file(), pdf_beluga\write_file(), pdf_canelle\write_file(), pdf_cornas\write_file(), pdf_crabe\write_file(), pdf_cyan\write_file(), pdf_eagle\write_file(), pdf_eagle_proforma\write_file(), pdf_einstein\write_file(), pdf_eratosthene\write_file(), pdf_espadon\write_file(), pdf_merou\write_file(), pdf_muscadet\write_file(), pdf_octopus\write_file(), pdf_rouget\write_file(), pdf_sepamandate\write_file(), pdf_soleil\write_file(), pdf_sponge\write_file(), pdf_squille\write_file(), pdf_standard\write_file(), pdf_standard\write_file(), pdf_standard\write_file(), pdf_standard_asset\write_file(), pdf_standard_myobject\write_file(), pdf_standard_recruitmentjobposition\write_file(), pdf_storm\write_file(), pdf_strato\write_file(), pdf_timespent\write_file(), pdf_typhon\write_file(), pdf_vinci\write_file(), and pdf_zenith\write_file().

◆ dol_sanitizePathName()

dol_sanitizePathName ( $str,
$newstr = '_',
$unaccent = 1 )

Clean a string to use it as a path name.

Similar to dol_sanitizeFileName but accept / and \ chars. Replace also '–' and ' -' strings, they are used for parameters separation (Note: ' - ' is allowed).

Parameters
string$strString to clean
string$newstrString to replace bad chars with
int$unaccent1=Remove also accent (default), 0 do not remove them
Returns
string String cleaned (a-zA-Z_)
See also
dol_string_nospecial(), dol_string_unaccent(), dol_sanitizeFileName()

Definition at line 1575 of file functions.lib.php.

Referenced by FileUpload\__construct(), CommonObject\commonGenerateDocument(), dol_uncompress(), AntiVir\getCliCommand(), EmailCollector\getpart(), FileUpload\handleFileUpload(), dolReceiptPrinter\initPrinter(), Documents\post(), and write_conf_file().

◆ dol_sanitizeUrl()

dol_sanitizeUrl ( $stringtoclean,
$type = 1 )

Clean a string to use it as an URL (into a href or src attribute)

Parameters
string$stringtocleanString to clean
int$type0=Accept all Url, 1=Clean external Url (keep only relative Url)
Returns
string Escaped string.

Definition at line 1596 of file functions.lib.php.

◆ dol_set_focus()

dol_set_focus ( $selector)

Set focus onto field with selector (similar behaviour of 'autofocus' HTML5 tag)

Parameters
string$selectorSelector ('id' or 'input[name="ref"]') to use to find the HTML input field that must get the autofocus. You must use a CSS selector, so unique id preceding with the '#' char.
Returns
void

Definition at line 11242 of file functions.lib.php.

◆ dol_shutdown()

dol_shutdown ( )

Function called at end of web php process.

Returns
void

Definition at line 632 of file functions.lib.php.

◆ dol_size()

dol_size ( $size,
$type = '' )

Optimize a size for some browsers (phone, smarphone, ...)

Parameters
int$sizeSize we want
string$typeType of optimizing: '' = function used to define a size for truncation 'width' = function is used to define a width
Returns
int New size after optimizing

Definition at line 1523 of file functions.lib.php.

Referenced by box_members_by_tags\loadBox(), and box_members_by_type\loadBox().

◆ dol_sort_array()

dol_sort_array ( & $array,
$index,
$order = 'asc',
$natsort = 0,
$case_sensitive = 0,
$keepindex = 0 )

Advanced sort array by the value of a given key, which produces ascending (default) or descending output and uses optionally natural case insensitive sorting (which can be optionally case sensitive as well).

Parameters
array<string|int,mixed>$array Array to sort (array of array('key1'=>val1,'key2'=>val2,'key3'...) or array of objects)
string$indexKey in array to use for sorting criteria
string$orderSort order ('asc' or 'desc')
int<0,1>$natsort If values are strings (I said value not type): 0=Use alphabetical order, 1=use "natural" sort (natsort) If values are numeric (I said value not type): 0=Use numeric order (even if type is string) so use a "natural" sort, 1=use "natural" sort too (same than 0), -1=Force alphabetical order
int<0,1>$case_sensitive 1=sort is case sensitive, 0=not case sensitive
int<0,1>$keepindex If 0 and index key of array to sort is a numeric, then index will be rewritten. If 1 or index key is not numeric, key for index is kept after sorting.
Returns
array<string|int,mixed> Return the sorted array (the source array is not modified !)

Definition at line 9974 of file functions.lib.php.

Referenced by FormCardWebPortal\bodyEdit(), FormCardWebPortal\bodyView(), dol_dir_list(), Categorie\get_full_arbo(), EcmDirectory\get_full_arbo(), User\get_full_tree(), Setup\getCheckIntegrity(), FormListWebPortal\init(), FormFile\list_of_autoecmfiles(), FormFile\list_of_documents(), Form\load_cache_availability(), Form\load_cache_invoice_subtype(), Form\load_cache_transport_mode(), Form\load_cache_types_paiements(), Form\loadCacheInputReason(), print_auguria_menu(), print_eldy_menu(), rebuildObjectClass(), Form\select_country(), FormCompany\select_juridicalstatus(), show_contacts(), CommonObject\show_photos(), FormFile\showdocuments(), MenuManager\showmenu(), and showModulesExludedForExternal().

◆ dol_strftime()

dol_strftime ( $fmt,
$ts = false,
$is_gmt = false )

Format a string.

Parameters
string$fmtFormat of strftime function (http://php.net/manual/fr/function.strftime.php)
int | false$tsTimestamp (If is_gmt is true, timestamp is already includes timezone and daylight saving offset, if is_gmt is false, timestamp is a GMT timestamp and we must compensate with server PHP TZ)
bool$is_gmtSee comment of timestamp parameter
Returns
string A formatted string
See also
dol_stringtotime()

Definition at line 3191 of file functions.lib.php.

◆ dol_string_is_good_iso()

dol_string_is_good_iso ( $s,
$clean = 0 )

Check if a string is a correct iso string If not, it will not be considered as HTML encoded even if it is by FPDF.

Example, if string contains euro symbol that has ascii code 128

Parameters
string$sString to check
int$cleanClean if it is not an ISO. Warning, if file is utf8, you will get a bad formatted file.
Returns
int|string 0 if bad iso, 1 if good iso, Or the clean string if $clean is 1
Deprecated
Duplicate of ascii_check()
See also
ascii_check()

Definition at line 8467 of file functions.lib.php.

◆ dol_string_neverthesehtmltags()

dol_string_neverthesehtmltags ( $stringtoclean,
$disallowed_tags = array('textarea'),
$cleanalsosomestyles = 0 )

Clean a string from some undesirable HTML tags.

Note: You should use instead dol_string_onlythesehtmltags() that is more secured if you can.

Parameters
string$stringtocleanString to clean
array$disallowed_tagsArray of tags not allowed
int$cleanalsosomestylesClean also some tags
Returns
string String cleaned
See also
dol_escape_htmltag() strip_tags() dol_string_nohtmltag() dol_string_onlythesehtmltags() dol_string_onlythesehtmlattributes()

Definition at line 8037 of file functions.lib.php.

Referenced by Form\editfieldval().

◆ dol_string_nohtmltag()

dol_string_nohtmltag ( $stringtoclean,
$removelinefeed = 1,
$pagecodeto = 'UTF-8',
$strip_tags = 0,
$removedoublespaces = 1 )

Clean a string from all HTML tags and entities.

This function differs from strip_tags because:


  • are replaced with
    if removelinefeed=0 or 1
  • if entities are found, they are decoded BEFORE the strip
  • you can decide to convert line feed into a space
Parameters
string$stringtocleanString to clean
integer$removelinefeed1=Replace all new lines by 1 space, 0=Only ending new lines are removed others are replaced with
, 2=The ending new line is removed but others are kept with the same number of
than the nb of
when there is both "...<br>\n..."
string$pagecodetoEncoding of input/output string
integer$strip_tags0=Use internal strip, 1=Use strip_tags() php function (bugged when text contains a < char that is not for a html tag or when tags is not closed like '<img onload=aaa')
integer$removedoublespacesReplace double space into one space
Returns
string String cleaned
See also
dol_escape_htmltag() strip_tags() dol_string_onlythesehtmltags() dol_string_neverthesehtmltags(), dolStripPhpCode()

Definition at line 7807 of file functions.lib.php.

Referenced by Adherent\_load_ldap_info(), AdherentType\_load_ldap_info(), Contact\_load_ldap_info(), User\_load_ldap_info(), UserGroup\_load_ldap_info(), pdf_standard_actions\_pages(), mailing_xinputfile\add_to_target(), ajax_dialog(), build_calfile(), build_rssfile(), pdf_cyan\defineColumnField(), pdf_eagle_proforma\defineColumnField(), pdf_eratosthene\defineColumnField(), pdf_octopus\defineColumnField(), pdf_sponge\defineColumnField(), dol_add_file_process(), DolGraph\draw_chart(), ExportExcel2007\excel_clean(), FormMail\get_form(), CommonDocGenerator\getExtrafieldContent(), getFullName(), Adherent\getNomUrl(), Commande\getNomUrl(), CommandeFournisseur\getNomUrl(), FactureFournisseur\getNomUrl(), Propal\getNomUrl(), SupplierProposal\getNomUrl(), User\getNomUrl(), getStructuredData(), Societe\getTooltipContentArray(), User\getTooltipContentArray(), pdf_build_address(), print_left_auguria_menu(), print_left_eldy_menu(), AccountancyExport\toAnsi(), ExportTsv\tsv_clean(), and ActionsTicket\viewTicketOriginalMessage().

◆ dol_string_nospecial()

dol_string_nospecial ( $str,
$newstr = '_',
$badcharstoreplace = '',
$badcharstoremove = '',
$keepspaces = 0 )

Clean a string from all punctuation characters to use it as a ref or login.

This is a more complete function than dol_sanitizeFileName().

Parameters
string$strString to clean
string$newstrString to replace forbidden chars with
array | string$badcharstoreplaceArray of forbidden characters to replace. Use '' to keep default list.
array | string$badcharstoremoveArray of forbidden characters to remove. Use '' to keep default list.
int$keepspaces1=Do not treat space as a special char to replace or remove
Returns
string Cleaned string
See also
dol_sanitizeFilename(), dol_string_unaccent(), dol_string_nounprintableascii()

Definition at line 1722 of file functions.lib.php.

Referenced by addFileIntoDatabaseIndex(), barcode_encode_genbarcode(), BonPrelevement\buildRumNumber(), check_value(), Societe\contact_get_property(), Product\create(), ProductAttribute\create(), ProductAttributeValue\create(), CommonObject\createCommon(), PartnershipUtils\doCancelStatusOfMemberPartnership(), dol_buildlogin(), PartnershipUtils\doWarningOfPartnershipIfDolibarrBacklinkNotfound(), DolGraph\draw_chart(), DolGraph\draw_jflot(), BonPrelevement\EnregDestinataireSEPA(), BonPrelevement\EnregEmetteurSEPA(), AccountancyExport\exportFEC(), AccountancyExport\exportFEC2(), BonPrelevement\generate(), get_next_value(), AntiVir\getCliCommand(), Product\update(), ProductAttribute\update(), ProductAttributeValue\update(), CommonObject\updateCommon(), and doc_generic_odt\write_file().

◆ dol_string_nounprintableascii()

dol_string_nounprintableascii ( $str,
$removetabcrlf = 1 )

Clean a string from all non printable ASCII chars (0x00-0x1F and 0x7F).

It can also removes also Tab-CR-LF. UTF8 chars remains. This can be used to sanitize a string and view its real content. Some hacks try to obfuscate attacks by inserting non printable chars. Note, for information: UTF8 on 1 byte are: \x00-\7F 2 bytes are: byte 1 \xc0-\xdf, byte 2 = \x80-\xbf 3 bytes are: byte 1 \xe0-\xef, byte 2 = \x80-\xbf, byte 3 = \x80-\xbf 4 bytes are: byte 1 \xf0-\xf7, byte 2 = \x80-\xbf, byte 3 = \x80-\xbf, byte 4 = \x80-\xbf

Parameters
string$strString to clean
int$removetabcrlfRemove also CR-LF
Returns
string Cleaned string
See also
dol_sanitizeFilename(), dol_string_unaccent(), dol_string_nospecial()

Definition at line 1756 of file functions.lib.php.

Referenced by DolibarrApiAccess\__isAllowed().

◆ dol_string_onlythesehtmlattributes()

dol_string_onlythesehtmlattributes ( $stringtoclean,
$allowed_attributes = null )

Clean a string from some undesirable HTML tags.

Note: Complementary to dol_string_onlythesehtmltags(). This method is used for example by dol_htmlwithnojs() when option MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES is set to 1.

Parameters
string$stringtocleanString to clean
string[]$allowed_attributesArray of tags not allowed
Returns
string String cleaned
See also
dol_escape_htmltag() strip_tags() dol_string_nohtmltag() dol_string_onlythesehtmltags() dol_string_neverthesehtmltags() @phan-suppress PhanUndeclaredProperty

Definition at line 7952 of file functions.lib.php.

◆ dol_string_onlythesehtmltags()

dol_string_onlythesehtmltags ( $stringtoclean,
$cleanalsosomestyles = 1,
$removeclassattribute = 1,
$cleanalsojavascript = 0,
$allowiframe = 0,
$allowed_tags = array(),
$allowlink = 0 )

Clean a string to keep only desirable HTML tags.

WARNING: This also clean HTML comments (because they can be used to obfuscate tag name).

Parameters
string$stringtocleanString to clean
int$cleanalsosomestylesRemove absolute/fixed positioning from inline styles
int$removeclassattribute1=Remove the class attribute from tags
int$cleanalsojavascriptRemove also occurrence of 'javascript:'.
int$allowiframeAllow iframe tags.
string[]$allowed_tagsList of allowed tags to replace the default list
int$allowlinkAllow "link" tags.
Returns
string String cleaned
See also
dol_htmlwithnojs() dol_escape_htmltag() strip_tags() dol_string_nohtmltag() dol_string_neverthesehtmltags()

Definition at line 7881 of file functions.lib.php.

Referenced by Form\editfieldval().

◆ dol_string_unaccent()

◆ dol_strlen()

dol_strlen ( $string,
$stringencoding = 'UTF-8' )

Make a strlen call.

Works even if mbstring module not enabled

Parameters
string$stringString to calculate length
string$stringencodingEncoding of string
Returns
int Length of string

Definition at line 4624 of file functions.lib.php.

Referenced by Product\_get_stats(), activateModulesRequiredByCountry(), Contrat\addline(), ActionsAdherentCardCommon\assign_values(), ActionsCardCommon\assign_values(), ActionsContactCardCommon\assign_values(), binhex(), User\build_path_from_id_user(), calEncode(), Don\check(), Product\check(), check_value(), Productlot\checkSellOrEatByMandatoryFromProductAndDates(), chequereceipt_pdf_create(), complete_dictionary_with_modules(), complete_elementList_with_modules(), Form\constructProductListOption(), BookKeeping\create(), Contrat\create(), Cronjob\create(), EcmFiles\create(), ExpeditionLineBatch\create(), Product\create(), Productbatch\create(), Productlot\create(), ReceptionLineBatch\create(), Ticket\create(), Website\create(), BookKeeping\createStd(), pdf_cyan\defineColumnField(), pdf_eagle_proforma\defineColumnField(), pdf_eratosthene\defineColumnField(), pdf_octopus\defineColumnField(), pdf_sponge\defineColumnField(), doc_label_pdf_create(), dol_ch_controle_bvrb(), dol_decode(), dol_encode(), dol_setshmop(), dol_verifyHash(), AccountancyExport\exportQuadratus(), AdherentType\fetch(), Product\fetch(), fichinter_create(), Adherent\generateDocument(), Availabilities\generateDocument(), BOM\generateDocument(), Calendar\generateDocument(), Commande\generateDocument(), CommandeFournisseur\generateDocument(), ConferenceOrBooth\generateDocument(), ConferenceOrBoothAttendee\generateDocument(), Contrat\generateDocument(), Delivery\generateDocument(), Don\generateDocument(), Entrepot\generateDocument(), Evaluation\generateDocument(), EvaluationLine\generateDocument(), Expedition\generateDocument(), ExpenseReport\generateDocument(), Facture\generateDocument(), Fichinter\generateDocument(), Job\generateDocument(), KnowledgeRecord\generateDocument(), Mo\generateDocument(), MouvementStock\generateDocument(), MyObject\generateDocument(), Partnership\generateDocument(), Position\generateDocument(), Product\generateDocument(), ProductFournisseurPrice\generateDocument(), Productlot\generateDocument(), Project\generateDocument(), Propal\generateDocument(), Reception\generateDocument(), RecruitmentCandidature\generateDocument(), RecruitmentJobPosition\generateDocument(), Skill\generateDocument(), Skilldet\generateDocument(), SkillRank\generateDocument(), Societe\generateDocument(), StockTransfer\generateDocument(), StockTransferLine\generateDocument(), SupplierProposal\generateDocument(), Target\generateDocument(), Task\generateDocument(), Ticket\generateDocument(), TimeSpent\generateDocument(), User\generateDocument(), UserGroup\generateDocument(), Workstation\generateDocument(), get_next_value(), DolGraph\GetCeilMaxValue(), DolGraph\GetFloorMinValue(), GoogleAPI\getGeoCoordinatesOfAddress(), modGeneratePassStandard\getNewGeneratedPassword(), hexbin(), ImportCsv\import_read_record(), ImportXlsx\import_read_record(), isValidLuhn(), isValidSiren(), isValidSiret(), Ldap\littleEndian(), Form\load_tva(), box_activity\loadBox(), box_factures\loadBox(), box_factures_fourn_imp\loadBox(), box_factures_imp\loadBox(), box_graph_invoices_permonth\loadBox(), box_graph_invoices_peryear\loadBox(), box_graph_invoices_supplier_permonth\loadBox(), box_graph_nb_ticket_last_x_days\loadBox(), box_graph_nb_tickets_type\loadBox(), box_graph_new_vs_close_ticket\loadBox(), box_graph_orders_permonth\loadBox(), box_graph_orders_supplier_permonth\loadBox(), box_graph_product_distribution\loadBox(), box_graph_propales_permonth\loadBox(), box_graph_ticket_by_severity\loadBox(), box_last_modified_knowledgerecord\loadBox(), box_last_modified_ticket\loadBox(), box_last_ticket\loadBox(), box_lastlogin\loadBox(), box_project\loadBox(), box_project_opportunities\loadBox(), box_task\loadBox(), box_validated_projects\loadBox(), makesalt(), members_card_pdf_create(), pdf_bank(), removeGlobalParenthesis(), Form\select_produits_fournisseurs_list(), Notify\send(), FormSms\show_form(), BookKeeping\update(), CompanyBankAccount\update(), Cronjob\update(), EcmFiles\update(), FactureFournisseur\update(), Fichinter\update(), Productlot\update(), Project\update(), Ticket\update(), Website\update(), Contrat\updateline(), modGeneratePassPerso\validatePassword(), modGeneratePassStandard\validatePassword(), mod_barcode_product_standard\verif(), mod_barcode_thirdparty_standard\verif(), mod_codeclient_monkey\verif(), mod_codeclient_monkey\verif_syntax(), Ticket\verify(), pdf_eagle\write_file(), pdf_espadon\write_file(), pdf_rouget\write_file(), pdf_squille\write_file(), modPhpbarcode\writeBarCode(), and modTcpdfbarcode\writeBarCode().

◆ dol_strtolower()

dol_strtolower ( $string,
$encoding = "UTF-8" )

Convert a string to lower.

Never use strtolower because it does not works with UTF8 strings.

Parameters
string$stringString to encode
string$encodingCharacter set encoding
Returns
string String converted

Definition at line 2038 of file functions.lib.php.

◆ dol_strtoupper()

dol_strtoupper ( $string,
$encoding = "UTF-8" )

Convert a string to upper.

Never use strtolower because it does not works with UTF8 strings.

Parameters
string$stringString to encode
string$encodingCharacter set encoding
Returns
string String converted
See also
dol_ucfirst(), dol_ucwords()

Definition at line 2055 of file functions.lib.php.

Referenced by Adherent\getmorphylib().

◆ dol_substr()

dol_substr ( $string,
$start,
$length = null,
$stringencoding = '',
$trunconbytes = 0 )

Make a substring.

Works even if mbstring module is not enabled for better compatibility.

Parameters
string$stringString to scan
int$startStart position (0 for first char)
int | null$lengthLength (in nb of characters or nb of bytes depending on trunconbytes param)
string$stringencodingPage code used for input string encoding
int$trunconbytes1=Length is max of bytes instead of max of characters
Returns
string substring

Definition at line 4647 of file functions.lib.php.

Referenced by calEncode(), Project\create(), dolEncrypt(), get_next_value(), Job\getKanbanView(), Skill\getKanbanView(), Societe\getTypeUrl(), removeGlobalParenthesis(), Cronjob\run_jobs(), AccountancyExport\toAnsi(), and ExportExcel2007\write_record().

◆ dol_syslog()

dol_syslog ( $message,
$level = LOG_INFO,
$ident = 0,
$suffixinfilename = '',
$restricttologhandler = '',
$logcontext = null )

Write log message into outputs.

Possible outputs can be: SYSLOG_HANDLERS = ["mod_syslog_file"] file name is then defined by SYSLOG_FILE SYSLOG_HANDLERS = ["mod_syslog_syslog"] facility is then defined by SYSLOG_FACILITY Warning, syslog functions are bugged on Windows, generating memory protection faults. To solve this, use logging to files instead of syslog (see setup of module). Note: If constant 'SYSLOG_FILE_NO_ERROR' defined, we never output any error message when writing to log fails. Note: You can get log message into html sources by adding parameter &logtohtml=1 (constant MAIN_LOGTOHTML must be set) This function works only if syslog module is enabled. This must not use any call to other function calling dol_syslog (avoid infinite loop).

Parameters
string$messageLine to log. ''=Show nothing
int$levelLog level On Windows LOG_ERR=4, LOG_WARNING=5, LOG_NOTICE=LOG_INFO=6, LOG_DEBUG=6 if define_syslog_variables ou PHP 5.3+, 7 if dolibarr On Linux LOG_ERR=3, LOG_WARNING=4, LOG_NOTICE=5, LOG_INFO=6, LOG_DEBUG=7
int$ident1=Increase ident of 1 (after log), -1=Decrease ident of 1 (before log)
string$suffixinfilenameWhen output is a file, append this suffix into default log filename. Example '_stripe', '_mail'
string$restricttologhandlerForce output of log only to this log handler
array | null$logcontextIf defined, an array with extra information (can be used by some log handlers)
Returns
void @phan-suppress PhanPluginUnknownArrayFunctionParamType $logcontext is not defined in detail

Definition at line 2120 of file functions.lib.php.

Referenced by CMailFile\__construct(), CSMSFile\__construct(), DolEditor\__construct(), DolGeoIP\__construct(), DoliDBMysqli\__construct(), DoliDBPgsql\__construct(), DoliDBSqlite3\__construct(), ImportCsv\__construct(), ImportXlsx\__construct(), mailing_thirdparties_services_expired\__construct(), pdf_octopus\__construct(), DolibarrApiAccess\__isAllowed(), DolibarrModules\_active(), MouvementStock\_create(), MouvementStock\_createSubProduct(), CMailFile\_encode_file(), Stats\_getAllByProduct(), Stats\_getAllByYear(), Stats\_getAmountByMonth(), Stats\_getAverageByMonth(), Stats\_getNbByMonth(), Stats\_getNbByYear(), DolibarrModules\_init(), DolibarrModules\_load_tables(), Product\_log_price(), pdf_standard_actions\_pages(), DolibarrModules\_remove(), RejetPrelevement\_send_email(), DolibarrModules\_unactive(), AccountingAccount\accountActivate(), AccountingAccount\accountDeactivate(), BookKeeping\accountingResult(), activateModule(), activateModulesRequiredByCountry(), ContratLigne\active_line(), Ldap\add(), Societe\add_commercial(), CommonObject\add_contact(), CommonObject\add_element_resource(), Product\add_fournisseur(), CommonObject\add_object_linked(), Propal\add_product(), SupplierProposal\add_product(), Product\add_sousproduit(), MailmanSpip\add_to_mailman(), MailmanSpip\add_to_spip(), mailing_contacts1\add_to_target(), mailing_eventorganization\add_to_target(), mailing_fraise\add_to_target(), mailing_mailing_mymodule_selector1\add_to_target(), mailing_partnership\add_to_target(), mailing_pomme\add_to_target(), mailing_thirdparties\add_to_target(), mailing_thirdparties_services_expired\add_to_target(), mailing_xinputfile\add_to_target(), mailing_advthirdparties\add_to_target_spec(), Categorie\add_type(), Account\add_url_line(), Ldap\addAttribute(), addDocumentModel(), BonPrelevement\AddFacture(), addFileIntoDatabaseIndex(), BOM\addLine(), ProductAttribute\addLine(), Account\addline(), BonPrelevement\addline(), Commande\addline(), CommandeFournisseur\addline(), Contrat\addline(), ExpenseReport\addline(), Facture\addline(), FactureFournisseur\addline(), FactureFournisseurRec\addline(), FactureRec\addline(), Fichinter\addline(), Propal\addline(), SupplierProposal\addline(), Expedition\addline_batch(), FichinterRec\addLineRec(), Holiday\addLogCP(), BonPrelevement\addNotification(), Localtax\addPayment(), Tva\addPayment(), Paiement\addPaymentToBank(), PaymentExpenseReport\addPaymentToBank(), PaymentLoan\addPaymentToBank(), PaymentSalary\addPaymentToBank(), User\addrights(), UserGroup\addrights(), MailingTargets\addTargetsToDatabase(), Task\addTimeSpent(), ActionsMyModule\afterPDFCreation(), Categorie\already_exists(), BlockedLog\alreadyUsed(), CommandeFournisseur\approve(), Holiday\approve(), Partnership\approve(), Contrat\array_detail(), Ticket\assignUser(), ProductAttribute\attributeOrder(), Commande\availability(), Propal\availability(), barcode_encode(), barcode_encode_genbarcode(), barcode_print(), ActionsMyModule\beforePDFCreation(), DoliDB\begin(), Lettering\bookkeepingLetteringAll(), build_calfile(), Import\build_example_file(), ActionComm\build_exportfile(), Export\build_file(), Export\build_filterQuery(), User\build_path_from_id_user(), build_rssfile(), modPhpbarcode\buildBarCode(), modTcpdfbarcode\buildBarCode(), Categorie\buildPathFromId(), calcul_price_total(), CommonInvoice\calculate_date_lim_reglement(), MouvementStock\calculateBalanceForProductBefore(), MailmanSpip\callMailman(), CommandeFournisseur\Cancel(), Commande\cancel(), Expedition\cancel(), Stripe\cardStripe(), EcmDirectory\changeNbOfFiles(), Product\check_barcode(), Societe\check_codeclient(), Societe\check_codefournisseur(), CMailFile\check_server_port(), check_user_password_dolibarr(), check_user_password_empty(), check_user_password_forceuser(), check_user_password_googleoauth(), check_user_password_http(), check_user_password_ldap(), check_user_password_openid(), check_user_password_openid_connect(), check_value(), checkBanForAccount(), mod_syslog_file\checkConfiguration(), mod_syslog_syslog\checkConfiguration(), PartnershipUtils\checkDolibarrBacklink(), mod_codecompta_digitaria\checkIfAccountancyCodeIsAlreadyUsed(), checkLoginPassEntity(), AccountingAccount\checkUsage(), checkUserAccessToObject(), Commande\classifyBilled(), Propal\classifyBilled(), Commande\classifyUnBilled(), Utils\cleanUnfinishedCronjob(), MailingTargets\clear_target(), User\clearrights(), Product\clone_associations(), Product\clone_fournisseurs(), Product\clone_price(), DoliDBMysqli\close(), DoliDBPgsql\close(), DoliDBSqlite3\close(), Ticket\close(), BookKeeping\closeFiscalPeriod(), Societe\codeclient_modifiable(), Societe\codefournisseur_modifiable(), CommandeFournisseur\commande(), commande_prepare_head(), DoliDB\commit(), CommonObject\commonGenerateDocument(), complete_dictionary_with_modules(), complete_elementList_with_modules(), completeFileArrayWithDatabaseInfo(), InterfaceTicketEmail\composeAndSendAdminMessage(), InterfaceTicketEmail\composeAndSendCustomerMessage(), ExpenseReport\computeTotalKm(), DoliDBMysqli\connect(), DoliDBSqlite3\connect(), Ldap\connectBind(), MailmanSpip\connectSpip(), Form\constructProductListOption(), Categorie\containsObject(), contract_prepare_head(), DoliDBSqlite3\convertSQLFromMysql(), WebsitePage\countAll(), ProductAttribute\countChildProducts(), ProductAttribute\countChildValues(), AdherentStats\countMembersByTagAndStatus(), AdherentStats\countMembersByTypeAndStatus(), Categorie\countNbOfCategories(), Account\create(), AccountancyCategory\create(), AccountancySystem\create(), AccountingAccount\create(), ActionComm\create(), Adherent\create(), AdherentType\create(), AdvanceTargetingMailing\create(), BankCateg\create(), BlockedLog\create(), BlockedLogAuthority\create(), BonPrelevement\create(), BookKeeping\create(), Bookmark\create(), CashControl\create(), Categorie\create(), Cchargesociales\create(), Ccountry\create(), CGenericDic\create(), ChargeSociales\create(), CLeadStatus\create(), Commande\create(), CommandeFournisseur\create(), Comment\create(), Contact\create(), Contrat\create(), Cpaiement\create(), CProductNature\create(), Cregion\create(), Cronjob\create(), Cstate\create(), Ctypent\create(), Ctyperesource\create(), CUnits\create(), CurrencyRate\create(), Delivery\create(), Deplacement\create(), DiscountAbsolute\create(), Dolresource\create(), EcmDirectory\create(), EcmFiles\create(), Entrepot\create(), Establishment\create(), Events\create(), Expedition\create(), ExpeditionLineBatch\create(), ExpenseReport\create(), Export\create(), Facture\create(), FactureFournisseur\create(), Fichinter\create(), Fiscalyear\create(), Holiday\create(), Import\create(), Link\create(), Loan\create(), LoanSchedule\create(), Localtax\create(), Mailing\create(), Menubase\create(), MultiCurrency\create(), Opensurveysondage\create(), Paiement\create(), PaiementFourn\create(), PaymentDonation\create(), PaymentExpenseReport\create(), PaymentLoan\create(), PaymentSalary\create(), PaymentSocialContribution\create(), PaymentTerm\create(), PaymentVarious\create(), PaymentVAT\create(), PriceExpression\create(), PriceGlobalVariable\create(), PriceGlobalVariableUpdater\create(), Product\create(), ProductAttribute\create(), ProductAttributeValue\create(), Productbatch\create(), ProductCustomerPrice\create(), Productlot\create(), ProductStockEntrepot\create(), Project\create(), Propal\create(), Propalmergepdfproduct\create(), Reception\create(), ReceptionLineBatch\create(), RejetPrelevement\create(), RemiseCheque\create(), Salary\create(), Societe\create(), SupplierProposal\create(), Task\create(), Ticket\create(), Tva\create(), User\create(), Website\create(), DolibarrModules\create_dirs(), User\create_from_contact(), Societe\create_from_member(), User\create_from_member(), Societe\create_individual(), ExtraFields\create_label(), Delivery\create_line(), createActionComm(), MouvementStock\createBatch(), Fournisseur\CreateCategory(), CommonObject\createCommon(), createContact(), Holiday\createCPusers(), Asset\createFromClone(), AssetModel\createFromClone(), Availabilities\createFromClone(), BOM\createFromClone(), BookKeeping\createFromClone(), Calendar\createFromClone(), CGenericDic\createFromClone(), CompanyPaymentMode\createFromClone(), ConferenceOrBoothAttendee\createFromClone(), Contrat\createFromClone(), CTicketCategory\createFromClone(), Ctyperesource\createFromClone(), DefaultValues\createFromClone(), EcmFiles\createFromClone(), EmailCollector\createFromClone(), EmailCollectorAction\createFromClone(), EmailCollectorFilter\createFromClone(), EmailSenderProfile\createFromClone(), Evaluation\createFromClone(), EvaluationLine\createFromClone(), Hook\createFromClone(), Inventory\createFromClone(), Job\createFromClone(), KnowledgeRecord\createFromClone(), Mo\createFromClone(), MyObject\createFromClone(), Partnership\createFromClone(), Position\createFromClone(), ProductFournisseurPrice\createFromClone(), Productlot\createFromClone(), ProductStockEntrepot\createFromClone(), Project\createFromClone(), Propal\createFromClone(), RecruitmentCandidature\createFromClone(), RecruitmentJobPosition\createFromClone(), Skill\createFromClone(), Skilldet\createFromClone(), SkillRank\createFromClone(), SocieteAccount\createFromClone(), StockTransfer\createFromClone(), StockTransferLine\createFromClone(), Target\createFromClone(), Task\createFromClone(), TimeSpent\createFromClone(), Website\createFromClone(), WebsitePage\createFromClone(), Workstation\createFromClone(), Facture\createFromCurrent(), createInvoice(), createInvoiceFromOrder(), createOrder(), createPayment(), Stripe\createPaymentStripe(), createProductOrService(), createProject(), FactureFournisseurRec\createRecurringInvoices(), FactureRec\createRecurringInvoices(), BookKeeping\createStd(), createThirdParty(), createUserFromThirdparty(), Project\createWeeklyReport(), Stripe\customerStripe(), DoliDBPgsql\DDLAddField(), DoliDBPgsql\DDLCreateDb(), DoliDBPgsql\DDLCreateUser(), DoliDBPgsql\DDLDescTable(), DoliDBPgsql\DDLUpdateField(), Societe\del_commercial(), Product\del_sousproduit(), MailmanSpip\del_to_mailman(), MailmanSpip\del_to_spip(), Categorie\del_type(), delDocumentModel(), Account\delete(), AccountancyCategory\delete(), AccountingAccount\delete(), ActionComm\delete(), Adherent\delete(), AdvanceTargetingMailing\delete(), BankCateg\delete(), BookKeeping\delete(), Categorie\delete(), Cchargesociales\delete(), Ccountry\delete(), CGenericDic\delete(), ChargeSociales\delete(), CLeadStatus\delete(), Commande\delete(), CommandeFournisseur\delete(), CommandeFournisseurLigne\delete(), Comment\delete(), CompanyBankAccount\delete(), Contact\delete(), Contrat\delete(), Cpaiement\delete(), CProductNature\delete(), Cregion\delete(), Cronjob\delete(), Cstate\delete(), Ctypent\delete(), Ctyperesource\delete(), CUnits\delete(), CurrencyRate\delete(), Deplacement\delete(), DiscountAbsolute\delete(), Documents\delete(), Dolresource\delete(), Don\delete(), EcmDirectory\delete(), EcmFiles\delete(), Entrepot\delete(), Establishment\delete(), Events\delete(), Expedition\delete(), ExpeditionLigne\delete(), ExpenseReport\delete(), Export\delete(), Facture\delete(), FactureFournisseur\delete(), FactureFournisseurRec\delete(), FactureLigne\delete(), FactureRec\delete(), Fichinter\delete(), FichinterRec\delete(), Holiday\delete(), Import\delete(), KnowledgeRecord\delete(), Ldap\delete(), Link\delete(), Loan\delete(), LoanSchedule\delete(), Localtax\delete(), Mailing\delete(), Menubase\delete(), Notify\delete(), Opensurveysondage\delete(), OrderLine\delete(), Paiement\delete(), PaymentDonation\delete(), PaymentExpenseReport\delete(), PaymentLoan\delete(), PaymentSalary\delete(), PaymentSocialContribution\delete(), PaymentTerm\delete(), PaymentVarious\delete(), PaymentVAT\delete(), PriceExpression\delete(), PriceGlobalVariable\delete(), PriceGlobalVariableUpdater\delete(), Product\delete(), ProductAttribute\delete(), ProductAttributeValue\delete(), Productbatch\delete(), ProductCustomerPrice\delete(), Productlot\delete(), ProductStockEntrepot\delete(), Project\delete(), Propal\delete(), PropaleLigne\delete(), Propalmergepdfproduct\delete(), Reception\delete(), ReceptionLineBatch\delete(), RemiseCheque\delete(), Societe\delete(), Subscription\delete(), SupplierInvoiceLine\delete(), SupplierProposal\delete(), SupplierProposalLine\delete(), Task\delete(), Ticket\delete(), Tva\delete(), User\delete(), UserBankAccount\delete(), Website\delete(), DolibarrModules\delete_boxes(), Propalmergepdfproduct\delete_by_file(), Propalmergepdfproduct\delete_by_product(), DolibarrModules\delete_const(), CommonObject\delete_contact(), DolibarrModules\delete_cronjobs(), DolibarrModules\delete_dirs(), ExtraFields\delete_label(), CommonObject\delete_linked_contact(), DolibarrModules\delete_menus(), DolibarrModules\delete_module_parts(), DolibarrModules\delete_permissions(), CommonObject\delete_resource(), DolibarrModules\delete_tabs(), Mailing\delete_targets(), Ldap\deleteAttribute(), BookKeeping\deleteByImportkey(), CommonObject\deleteByParentField(), BookKeeping\deleteByYearAndJournal(), CommonObject\deleteCommon(), AccountancyCategory\deleteCptCat(), CommonObject\deleteExtraFields(), deleteFilesIntoDatabaseIndex(), ExpeditionLineBatch\deleteFromShipment(), Lettering\deleteLettering(), BOM\deleteLine(), Contrat\deleteLine(), ExpenseReport\deleteLine(), Facture\deleteLine(), FactureFournisseur\deleteLine(), FichinterLigne\deleteLine(), ProductAttribute\deleteLine(), CommonObject\deleteLineCommon(), BookKeeping\deleteMvtNum(), CommonObject\deleteObjectLinked(), deleteProductOrService(), deleteThirdParty(), AdherentType\delMultiLangs(), Product\delMultiLangs(), Task\delTimeSpent(), Commande\demand_reason(), Propal\demand_reason(), CommonInvoice\demande_prelevement(), Salary\demande_prelevement(), CommonInvoice\demande_prelevement_delete(), Salary\demande_prelevement_delete(), CommandeFournisseur\dispatchProduct(), AccountancyCategory\display(), Contrat\doAutoRenewContracts(), doc_label_pdf_create(), PartnershipUtils\doCancelStatusOfMemberPartnership(), EmailCollector\doCollect(), dol_add_file_process(), AntiVir\dol_avscan_file(), dol_check_secure_access_document(), dol_convert_file(), dol_copy(), dol_delete_dir(), dol_delete_dir_recursive(), dol_delete_file(), dol_dir_list(), dol_filecache(), dol_ftp_connect(), dol_ftp_delete(), dol_imageResizeOrCrop(), dol_meta_create(), dol_move(), dol_move_dir(), dol_move_uploaded_file(), dol_set_user_param(), dol_stringtotime(), dol_uncompress(), dolCheckOnFileName(), dolCopyDir(), dolDecrypt(), dolGetElementUrl(), dolibarr_del_const(), dolibarr_get_const(), dolibarr_install_syslog(), dolibarr_set_const(), dolReplaceInFile(), dolSaveCssFile(), dolSaveHtaccessFile(), dolSaveHtmlHeader(), dolSaveIndexPage(), dolSaveJsFile(), dolSaveLicense(), dolSaveManifestJson(), dolSaveMasterFile(), dolSavePageAlias(), dolSavePageContent(), dolSaveReadme(), dolSaveRobotFile(), dolWebsiteOutput(), dolWebsiteReplacementOfLinks(), AssetModel\doScheduledJob(), Availabilities\doScheduledJob(), BOM\doScheduledJob(), Calendar\doScheduledJob(), ConferenceOrBooth\doScheduledJob(), ConferenceOrBoothAttendee\doScheduledJob(), KnowledgeRecord\doScheduledJob(), MyObject\doScheduledJob(), Partnership\doScheduledJob(), RecruitmentCandidature\doScheduledJob(), RecruitmentJobPosition\doScheduledJob(), StockTransfer\doScheduledJob(), StockTransferLine\doScheduledJob(), Target\doScheduledJob(), PartnershipUtils\doWarningOfPartnershipIfDolibarrBacklinkNotfound(), DolGraph\draw(), DolGraph\draw_chart(), DolGraph\draw_jflot(), Utils\dumpDatabase(), FormCompany\effectif_array(), encodedecode_dbpassconf(), envoi_mail(), Adherent\exclude(), Utils\executeCLI(), HookManager\executeHooks(), PrestaShopWebservice\executeRequest(), BookKeeping\export_bookkeeping(), Website\exportWebSite(), facture_prepare_head(), Account\fetch(), AccountancyCategory\fetch(), AccountancySystem\fetch(), AccountingAccount\fetch(), AccountingJournal\fetch(), ActionComm\fetch(), Adherent\fetch(), AdherentType\fetch(), AdvanceTargetingMailing\fetch(), BankCateg\fetch(), BlockedLogAuthority\fetch(), BonPrelevement\fetch(), BookKeeping\fetch(), Bookmark\fetch(), CActionComm\fetch(), Categorie\fetch(), Cchargesociales\fetch(), Ccountry\fetch(), CGenericDic\fetch(), ChargeSociales\fetch(), Commande\fetch(), CommandeFournisseur\fetch(), CommandeFournisseurLigne\fetch(), Comment\fetch(), Contact\fetch(), Contrat\fetch(), ContratLigne\fetch(), Cpaiement\fetch(), Cregion\fetch(), Cronjob\fetch(), Cstate\fetch(), Ctyperesource\fetch(), CurrencyRate\fetch(), Delivery\fetch(), Deplacement\fetch(), DiscountAbsolute\fetch(), Dolresource\fetch(), Don\fetch(), EcmDirectory\fetch(), EcmFiles\fetch(), Entrepot\fetch(), Establishment\fetch(), Events\fetch(), Expedition\fetch(), Export\fetch(), Facture\fetch(), FactureFournisseur\fetch(), FactureFournisseurLigneRec\fetch(), FactureFournisseurRec\fetch(), FactureLigneRec\fetch(), FactureRec\fetch(), Fichinter\fetch(), FichinterLigne\fetch(), FichinterRec\fetch(), Fiscalyear\fetch(), Holiday\fetch(), Import\fetch(), Ldap\fetch(), LignePrelevement\fetch(), Link\fetch(), Loan\fetch(), LoanSchedule\fetch(), Localtax\fetch(), Mailing\fetch(), Menubase\fetch(), ModeleBoxes\fetch(), MouvementStock\fetch(), MultiCurrency\fetch(), Opensurveysondage\fetch(), Partnership\fetch(), PaymentDonation\fetch(), PaymentExpenseReport\fetch(), PaymentLoan\fetch(), PaymentSalary\fetch(), PaymentSocialContribution\fetch(), PaymentTerm\fetch(), PaymentVarious\fetch(), PaymentVAT\fetch(), PriceExpression\fetch(), PriceGlobalVariable\fetch(), PriceGlobalVariableUpdater\fetch(), Product\fetch(), ProductAttribute\fetch(), ProductAttributeValue\fetch(), Productbatch\fetch(), ProductCustomerPrice\fetch(), Productlot\fetch(), ProductStockEntrepot\fetch(), Project\fetch(), Propal\fetch(), Propalmergepdfproduct\fetch(), Reception\fetch(), ReceptionLineBatch\fetch(), RejetPrelevement\fetch(), RemiseCheque\fetch(), Salary\fetch(), Societe\fetch(), Subscription\fetch(), SupplierProposal\fetch(), Task\fetch(), Ticket\fetch(), Tva\fetch(), User\fetch(), UserGroup\fetch(), Website\fetch(), WebsitePage\fetch(), CommonObject\fetch_barcode(), AdvanceTargetingMailing\fetch_by_element(), AdvanceTargetingMailing\fetch_by_mailing(), Propalmergepdfproduct\fetch_by_product(), ExpenseReport\fetch_line_by_project(), Commande\fetch_lines(), CommandeFournisseur\fetch_lines(), Contrat\fetch_lines(), Delivery\fetch_lines(), Expedition\fetch_lines(), ExpenseReport\fetch_lines(), Facture\fetch_lines(), FactureFournisseur\fetch_lines(), FactureFournisseurRec\fetch_lines(), FactureRec\fetch_lines(), Fichinter\fetch_lines(), FichinterRec\fetch_lines(), ProductAttribute\fetch_lines(), Propal\fetch_lines(), ExtraFields\fetch_name_optionals_label(), CommonObject\fetch_optionals(), ProductFournisseur\fetch_product_fournisseur_price(), Adherent\fetch_subscriptions(), ExpenseReport\fetch_users_approver_expensereport(), Holiday\fetch_users_approver_holiday(), AssetAccountancyCodes\fetchAccountancyCodes(), Asset\fetchAll(), AssetModel\fetchAll(), Availabilities\fetchAll(), BOM\fetchAll(), BOMLine\fetchAll(), BookKeeping\fetchAll(), Calendar\fetchAll(), CGenericDic\fetchAll(), CLeadStatus\fetchAll(), ConferenceOrBooth\fetchAll(), ConferenceOrBoothAttendee\fetchAll(), CProductNature\fetchAll(), Cronjob\fetchAll(), CTicketCategory\fetchAll(), Ctyperesource\fetchAll(), CUnits\fetchAll(), DefaultValues\fetchAll(), Dolresource\fetchAll(), EcmFiles\fetchAll(), EmailCollector\fetchAll(), Evaluation\fetchAll(), EvaluationLine\fetchAll(), ExpeditionLineBatch\fetchAll(), Holiday\fetchAll(), Hook\fetchAll(), Job\fetchAll(), KnowledgeRecord\fetchAll(), Link\fetchAll(), LoanSchedule\fetchAll(), Mo\fetchAll(), MoLine\fetchAll(), MyObject\fetchAll(), Opensurveysondage\fetchAll(), Partnership\fetchAll(), PartnershipType\fetchAll(), Position\fetchAll(), ProductAttribute\fetchAll(), ProductCustomerPrice\fetchAll(), ProductFournisseurPrice\fetchAll(), ProductStockEntrepot\fetchAll(), ReceptionLineBatch\fetchAll(), RecruitmentCandidature\fetchAll(), RecruitmentJobPosition\fetchAll(), Skill\fetchAll(), Skilldet\fetchAll(), SkillRank\fetchAll(), StockTransfer\fetchAll(), StockTransferLine\fetchAll(), Target\fetchAll(), Ticket\fetchAll(), TimeSpent\fetchAll(), User\fetchAll(), Website\fetchAll(), WebsitePage\fetchAll(), Workstation\fetchAll(), BookKeeping\fetchAllBalance(), BookKeeping\fetchAllByAccount(), Comment\fetchAllFor(), ProductCustomerPrice\fetchAllLog(), BookKeeping\fetchAllPerMvt(), Task\fetchAllTimeSpent(), Holiday\fetchByUser(), AssetDepreciationOptions\fetchDeprecationOptions(), Dolresource\fetchElementResource(), ExpeditionLineBatch\fetchFromStock(), Holiday\fetchLog(), CommonObject\fetchObjectFrom(), CommonObject\fetchObjectLinked(), CommonObject\fetchOneLike(), BookKeeping\fetchPerMvt(), Facture\fetchPreviousNextSituationInvoice(), Task\fetchTimeSpent(), Task\fetchTimeSpentOnTask(), Holiday\fetchUsers(), fichinter_prepare_head(), Productbatch\find(), ProductFournisseur\find_min_price_product_fournisseur(), PriceExpression\find_title(), Productbatch\findAll(), Productbatch\findAllForProduct(), CMailFile\findHtmlImagesIsSrcData(), FormFile\form_attach_new_file(), Form\form_confirm(), form_constantes(), FormCompany\form_prospect_level(), FormCompany\formProspectContactLevel(), BonPrelevement\generate(), Ai\generateContent(), Don\generateDocument(), RemiseCheque\generatePdf(), FactureLigne\get_allprev_progress(), Product\get_barcode(), Product\get_buyprice(), User\get_children(), mod_codecompta_aquarium\get_code(), mod_codecompta_digitaria\get_code(), ModeleAccountancyCode\get_code(), BookKeeping\get_compte_desc(), Project\get_element_list(), Categorie\get_full_arbo(), EcmDirectory\get_full_arbo(), User\get_full_tree(), get_next_value(), FactureLigne\get_prev_progress(), Facture\get_prev_sits(), doc_generic_member_odt\get_substitutionarray_object(), doc_generic_project_odt\get_substitutionarray_object(), doc_generic_task_odt\get_substitutionarray_object(), doc_generic_ticket_odt\get_substitutionarray_object(), doc_generic_user_odt\get_substitutionarray_object(), doc_generic_project_odt\get_substitutionarray_project_contacts(), Account\get_url(), AccountancyCategory\getAccountsWithNoCategory(), getActionComm(), ActionComm\getActions(), Stats\getAllByProductEntry(), User\getAllChildIds(), getAllImages(), CommonObject\getAllItemsLinkedByObjectID(), ExpenseReports\getAllPayments(), Salaries\getAllPayments(), ProjectStats\getAllProjectByStatus(), ExpenseReportIk\getAllRanges(), ExpenseReportRule\getAllRule(), TaskStats\getAllTaskByStatus(), Stats\getAmountByMonthWithPrevYear(), Paiement\getAmountsArray(), CommonInvoice\getArrayOfInvoiceSubtypes(), AccountingJournal\getAssetData(), DiscountAbsolute\getAvailableDiscounts(), Lettering\getBankLinesFromFkDocAndDocType(), Paiement\getBillsArray(), PaiementFourn\getBillsArray(), getCategory(), AccountancyCategory\getCats(), AccountancyCategory\getCatsCpts(), CommonObject\getChildrenOfLine(), Product\getChildsArbo(), Holiday\getConfCP(), getContact(), Contact\getContactRoles(), Societe\getContacts(), getContactsForThirdParty(), BookKeeping\getCountByMonthForFiscalPeriod(), Holiday\getCPforUser(), AccountancyCategory\getCptsCat(), SocieteAccount\getCustomerAccount(), CommonObject\getDefaultCreateValueFor(), PaymentTerm\getDefaultId(), Lettering\getDocTypeAndFkDocFromBankLines(), getDocument(), Dolresource\getElementResources(), ExpenseReportLine\getExpAmount(), getFormeJuridiqueLabel(), AssetDepreciationOptions\getGeneralDepreciationInfoForMode(), CommonObject\getIdContact(), getInvoice(), getInvoicesForThirdParty(), Translate\getLabelFromKey(), CommonObjectLine\getLabelOfUnit(), Product\getLabelOfUnit(), DolibarrModules\getLastActivationDate(), DolibarrModules\getLastActivationInfo(), Product\getLibFinished(), SupplierProposal\getLinesArray(), Lettering\getLinkedDocumentByGroup(), Lettering\getLinkedLines(), getListActionCommType(), BonPrelevement\getListInvoices(), RejetPrelevement\getListInvoices(), Contrat\getListOfContracts(), getListOfGroups(), InterfaceNotification\getListOfManagedEvents(), getListOfModels(), CommonInvoice\getListOfPayments(), getListOfProductsOrServices(), getListOfThirdParties(), ProductAttribute\getMaxAttributesPosition(), ExpenseReportIk\getMaxRangeNumber(), Stats\getNbByMonthWithPrevYear(), Commande\getNbOfShipments(), BookKeeping\getNextNumMvt(), Facture\getNextNumRef(), mod_asset_standard\getNextValue(), mod_barcode_product_standard\getNextValue(), mod_bom_standard\getNextValue(), mod_chequereceipt_mint\getNextValue(), mod_codeclient_monkey\getNextValue(), mod_commande_marbre\getNextValue(), mod_contract_serpis\getNextValue(), mod_delivery_jade\getNextValue(), mod_evaluation_standard\getNextValue(), mod_expedition_safor\getNextValue(), mod_expensereport_jade\getNextValue(), mod_facture_fournisseur_cactus\getNextValue(), mod_facture_mars\getNextValue(), mod_facture_terre\getNextValue(), mod_holiday_madonna\getNextValue(), mod_knowledgerecord_standard\getNextValue(), mod_lot_standard\getNextValue(), mod_member_advanced\getNextValue(), mod_member_simple\getNextValue(), mod_mo_standard\getNextValue(), mod_myobject_standard\getNextValue(), mod_partnership_standard\getNextValue(), mod_payment_cicada\getNextValue(), mod_project_simple\getNextValue(), mod_propale_marbre\getNextValue(), mod_reception_beryl\getNextValue(), mod_recruitmentcandidature_standard\getNextValue(), mod_recruitmentjobposition_standard\getNextValue(), mod_sn_standard\getNextValue(), mod_stocktransfer_standard\getNextValue(), mod_supplier_payment_bronan\getNextValue(), mod_supplier_proposal_marbre\getNextValue(), mod_takepos_ref_simple\getNextValue(), mod_task_simple\getNextValue(), mod_ticket_simple\getNextValue(), mod_workstation_standard\getNextValue(), Notify\getNotificationsArray(), Categories\getObjects(), Categorie\getObjectsInCateg(), getOrder(), getOrdersForThirdParty(), Orders\getOrderShipments(), Societe\getOutstandingBills(), Societe\getOutstandingOrders(), Societe\getOutstandingProposals(), Stripe\getPaymentIntent(), ProductAttribute\getPositionOfAttribute(), getProductOrService(), getProductsForCategory(), getProject(), Project\getProjectsAuthorizedForUser(), ExpenseReportIk\getRangesByCategory(), CommonObject\getRangOfLine(), Ldap\getRecords(), Don\getRemainToPay(), Dolistore\getRemoteCategories(), Dolistore\getRemoteProducts(), UserGroup\getrights(), BookKeeping\getRootAccount(), Form\getSelectConditionsPaiements(), Form\getSelectInvoiceSubtype(), Stripe\getSetupIntent(), ChargeSociales\getSommePaiement(), CommonInvoice\getSommePaiement(), Salary\getSommePaiement(), Tva\getSommePaiement(), getSourceDocRef(), getState(), Stripe\getStripeAccount(), DiscountAbsolute\getSumCreditNotesUsed(), AccountancyCategory\getSumDebitCredit(), DiscountAbsolute\getSumDepositsUsed(), DiscountAbsolute\getSumFromThisCreditNotesNotUsed(), Task\getSummaryOfTimeSpent(), Task\getSumOfAmount(), Loan\getSumPayment(), ExpenseReport\getSumPayments(), getSupplierInvoice(), getSupplierInvoicesForThirdParty(), Task\getTasksArray(), ExpenseReportIk\getTaxCategories(), getThirdParty(), Context\getThirdPartyAccountFromLogin(), SocieteAccount\getThirdPartyID(), CommonObject\getTotalDiscount(), ProjectStats\getTransformRateByMonthWithPrevYear(), getURLContent(), getUser(), Task\getUserRolesForProjectsOrTasks(), CommonObject\getValueFrom(), getVersions(), ProjectStats\getWeightedAmountByMonthWithPrevYear(), Task\hasChildren(), hash_call(), CommonObject\hasProductsOrServices(), Task\hasTimeSpent(), ImportCsv\import_insert(), ImportXlsx\import_insert(), ImportCsv\import_open_file(), ImportXlsx\import_open_file(), BankAccounts\index(), Contracts\index(), Documents\index(), Donations\index(), Interventions\index(), Login\index(), Orders\index(), Projects\index(), Proposals\index(), Receptions\index(), Salaries\index(), Shipments\index(), Tasks\index(), AccountingAccount\info(), ActionComm\info(), Adherent\info(), ChargeSociales\info(), Cronjob\info(), Deplacement\info(), Don\info(), Entrepot\info(), Establishment\info(), Fiscalyear\info(), Loan\info(), Paiement\info(), PaymentExpenseReport\info(), PaymentVarious\info(), Salary\info(), Tva\info(), Categorie\initAsSpecimen(), Commande\initAsSpecimen(), CommandeFournisseur\initAsSpecimen(), Expedition\initAsSpecimen(), Reception\initAsSpecimen(), HookManager\initHooks(), Target\initListOfTriggers(), dolReceiptPrinter\initPrinter(), CommandeFournisseurLigne\insert(), ContratLigne\insert(), ExpeditionLigne\insert(), ExpenseReportLine\insert(), FactureLigne\insert(), FichinterLigne\insert(), OrderLine\insert(), PropaleLigne\insert(), SupplierInvoiceLine\insert(), SupplierProposalLine\insert(), DolibarrModules\insert_boxes(), DolibarrModules\insert_const(), DolibarrModules\insert_cronjobs(), DolibarrModules\insert_dirs(), DolibarrModules\insert_menus(), DolibarrModules\insert_module_parts(), DolibarrModules\insert_permissions(), DolibarrModules\insert_tabs(), BookKeeping\insertAccountingReversal(), CommonObject\insertExtraFields(), CommonObject\insertExtraLanguages(), invoice_rec_prepare_head(), Propal\InvoiceArrayList(), Facture\is_last_in_cycle(), CommonObject\isExistingObject(), ProductAttribute\isUsed(), ProductAttributeValue\isUsed(), left_menu(), Lettering\letteringThirdparty(), CommonObject\line_max(), CommonObject\line_order(), DiscountAbsolute\link_to_invoice(), FormFile\list_of_autoecmfiles(), PriceExpression\list_price_expression(), ProductFournisseur\list_product_fournisseur_price(), Facture\list_qualified_avoir_invoices(), FactureFournisseur\list_qualified_avoir_supplier_invoices(), Facture\list_replacable_invoices(), FactureFournisseur\list_replacable_supplier_invoices(), InfoBox\listBoxes(), CActionComm\liste_array(), CommonObject\liste_contact(), CommonObject\listeTypeContacts(), PriceGlobalVariable\listGlobalVariables(), UserGroup\listGroupsForUser(), AdherentType\listMembersForMemberType(), ModeleExports\listOfAvailableExportFormat(), ModeleImports\listOfAvailableImportFormat(), listOfSessions(), Deplacement\listOfTypes(), ExpenseReport\listOfTypes(), PriceGlobalVariableUpdater\listPendingUpdaters(), ProductFournisseur\listProductFournisseurPriceLog(), PriceGlobalVariableUpdater\listUpdaters(), UserGroup\listUsersForGroup(), CommandeFournisseur\Livraison(), Translate\load(), Export\load_arrays(), Import\load_arrays(), Form\load_cache_availability(), Form\load_cache_conditions_paiements(), Form\load_cache_invoice_subtype(), Form\load_cache_transport_mode(), Form\load_cache_types_fees(), Form\load_cache_types_paiements(), Form\load_cache_vatrates(), Categorie\load_motherof(), EcmDirectory\load_motherof(), Contact\load_ref_elements(), Product\load_stats_commande(), Product\load_stock(), Product\loadBatchInfo(), box_actions\loadBox(), box_actions_future\loadBox(), box_birthdays\loadBox(), box_birthdays_members\loadBox(), box_clients\loadBox(), box_comptes\loadBox(), box_customers_outstanding_bill_reached\loadBox(), box_ficheinter\loadBox(), box_goodcustomers\loadBox(), box_prospect\loadBox(), Ticket\loadCacheCategoriesTickets(), Dolresource\loadCacheCodeTypeResource(), Translate\loadCacheCurrencies(), Ticket\loadCacheMsgsTicket(), Ticket\loadCacheSeveritiesTickets(), Ticket\loadCacheTypesTickets(), Commande\loadExpeditions(), Translate\loadFromDatabase(), FormProduct\loadLotStock(), User\loadParentOf(), CommandeFournisseur\loadReceptions(), Project\loadTimeSpent(), Project\loadTimeSpentMonth(), FormProduct\loadWarehouses(), FormProduct\loadWorkstations(), makesalt(), CommonInvoice\makeStripeSepaRequest(), Expedition\manageStockMvtOnEvt(), Ticket\markAsRead(), member_prepare_head(), Menubase\menuLeftCharger(), Societe\mergeCompany(), Task\mergeTask(), Task\mergeTimeSpentTask(), Ldap\modify(), FormAccounting\multi_select_journal(), FormAdvTargetEmailing\multiselectCivility(), BonPrelevement\NbFactureAPrelever(), Facture\newCycle(), num_open_day(), num_public_holiday(), ExpenseReport\offsetAlreadyGiven(), ExportCsv\open_file(), ExportExcel2007\open_file(), ExportTsv\open_file(), RssParser\parser(), pdf_getFormat(), ExpenseReport\periode_existe(), Documents\post(), Zapier\post(), print_paybox_redirect(), print_paypal_redirect(), printing_printipp\printFile(), PriceGlobalVariableUpdater\process(), Mos\produceAndConsume(), Mos\produceAndConsumeAll(), propal_prepare_head(), Utils\purgeFiles(), purgeSessions(), DoliDBMysqli\query(), DoliDBPgsql\query(), DoliDBSqlite3\query(), AdvanceTargetingMailing\query_contact(), AdvanceTargetingMailing\query_thirdparty(), rebuild_merge_pdf(), Categorie\rechercher(), EcmDirectory\refreshcachenboffile(), CommandeFournisseur\refuse(), Paiement\reject(), Project\remove_element(), ProductFournisseur\remove_fournisseur(), ProductFournisseur\remove_product_fournisseur_price(), RemiseCheque\removeCheck(), User\RemoveFromGroup(), Ldap\rename(), Expedition\reOpen(), Reception\reOpen(), Contrat\reopen(), Propal\reopen(), SupplierProposal\reopen(), Societe\replaceThirdparty(), Cronjob\reprogram_jobs(), Mailing\reset_targets_status(), Adherent\resiliate(), DoliDB\rollback(), Cronjob\run_jobs(), run_sql(), Interfaces\run_triggers(), InterfaceActionsAuto\runTrigger(), InterfaceActionsBlockedLog\runTrigger(), InterfaceContactRoles\runTrigger(), InterfaceEventOrganization\runTrigger(), InterfaceLdapsynchro\runTrigger(), InterfaceLogevents\runTrigger(), InterfaceMailmanSpipsynchro\runTrigger(), InterfaceMyModuleTriggers\runTrigger(), InterfaceNotification\runTrigger(), InterfaceStripe\runTrigger(), InterfaceTicketEmail\runTrigger(), InterfaceWebhookTriggers\runTrigger(), InterfaceZapierTriggers\runTrigger(), InfoBox\saveboxorder(), html_generic\saveFile(), Ldap\search(), Ticket\searchContactByEmail(), Ticket\searchSocidByEmail(), BookKeeping\select_account(), FormAccounting\select_account(), FormAccounting\select_accounting_category(), Form\select_all_categories(), FormAccounting\select_auxaccount(), FormAccounting\select_bookkeeping_importkey(), FormCompany\select_civility(), Form\select_comptes(), FormContract\select_contract(), Form\select_country(), Form\select_date(), DoliDBMysqli\select_db(), DoliDBSqlite3\select_db(), Form\select_dolgroups(), Form\select_dolusers(), FormProjets\select_element(), Form\select_incoterms(), FormIntervention\select_interventions(), FormAccounting\select_journal(), FormCompany\select_juridicalstatus(), Form\select_product_fourn_price(), Form\select_produits_fournisseurs_list(), Form\select_produits_list(), FormCompany\select_region(), Form\select_remises(), FormCompany\select_state(), FormResource\select_state(), Form\select_thirdparty_list(), Form\select_type_fees(), FormSocialContrib\select_type_socialcontrib(), Form\select_types_paiements(), FormResource\select_types_resource(), FormAdvTargetEmailing\selectAdvtargetemailingTemplate(), Form\selectAvailabilityDelay(), Form\selectcontacts(), Form\selectEstablishments(), FormWebPortal\selectForForms(), FormTicket\selectGroupTickets(), FormOrder\selectInputMethod(), Form\selectInvoiceRec(), FormProduct\selectLotDataList(), FormProduct\selectLotStock(), FormProjets\selectOpportunityStatus(), FormCategory\selectProductCategory(), FormPropal\selectProposalStatus(), FormTicket\selectSeveritiesTickets(), Form\selectShippingMethod(), Form\selectSituationInvoices(), Form\selectTransportMode(), FormWebsite\selectTypeOfContainer(), FormTicket\selectTypesTickets(), FormProduct\selectWarehouses(), FormProduct\selectWorkstations(), FormAccounting\selectyear_accountancy_bookkepping(), Notify\send(), Adherent\send_an_email(), User\send_password(), Utils\sendBackup(), Adherent\sendEmail(), ActionComm\sendEmailsReminder(), Facture\sendEmailsRemindersOnInvoiceDueDate(), FactureFournisseur\sendEmailsRemindersOnSupplierInvoiceDueDate(), sendEmailTo(), CMailFile\sendfile(), CSMSFile\sendfile(), Adherent\sendReminderForExpiredSubscription(), dolReceiptPrinter\sendTestToPrinter(), Ticket\sendTicketMessageByEmail(), dolReceiptPrinter\sendToPrinter(), Stripe\sepaStripe(), Societe\set_as_client(), Propal\set_availability(), ExpenseReport\set_cancel(), Facture\set_canceled(), Commande\set_date(), Propal\set_date(), RemiseCheque\set_date(), Fichinter\set_date_delivery(), Propal\set_demand_reason(), Fichinter\set_description(), Propal\set_echeance(), CommandeFournisseur\set_id_projet(), BonPrelevement\set_infocredit(), BonPrelevement\set_infotrans(), RemiseCheque\set_number(), ChargeSociales\set_paid(), ExpenseReport\set_paid(), Facture\set_paid(), FactureFournisseur\set_paid(), Salary\set_paid(), Commande\set_ref_client(), Facture\set_ref_client(), Propal\set_ref_client(), Commande\set_remise(), Facture\set_remise(), Societe\set_remise_client(), Societe\set_remise_supplier(), Commande\set_reopen(), ExpenseReport\set_save_from_refuse(), Loan\set_started(), ChargeSociales\set_unpaid(), ExpenseReport\set_unpaid(), Facture\set_unpaid(), FactureFournisseur\set_unpaid(), Product\setAccountancyCode(), Societe\setAccountancyCode(), ExpenseReport\setApproved(), CompanyBankAccount\setAsDefault(), CompanyPaymentMode\setAsDefault(), FactureFournisseurRec\setAutoValidate(), FactureRec\setAutoValidate(), FichinterRec\setAutoValidate(), CommonObject\setBankAccount(), Propal\setCancel(), Facture\setCanceled(), FactureFournisseur\setCanceled(), Societe\setCategories(), CommonObject\setCategoriesCommon(), Project\setClose(), Expedition\setClosed(), Reception\setClosed(), Ticket\setContract(), Ticket\setCustomer(), CommonObject\setDeliveryAddress(), Commande\setDeliveryDate(), CommandeFournisseur\setDeliveryDate(), Delivery\setDeliveryDate(), Expedition\setDeliveryDate(), Propal\setDeliveryDate(), Reception\setDeliveryDate(), SupplierProposal\setDeliveryDate(), ExpenseReport\setDeny(), Commande\setDiscount(), Facture\setDiscount(), CommonObject\setDocModel(), Commande\setDraft(), Facture\setDraft(), FactureFournisseur\setDraft(), Fichinter\setDraft(), Propal\setDraft(), Reception\setDraft(), SupplierProposal\setDraft(), Context\setEventMessages(), CommonObject\setExtraParameters(), Facture\setFinal(), FactureFournisseurRec\setFrequencyAndUnit(), FactureRec\setFrequencyAndUnit(), FichinterRec\setFrequencyAndUnit(), FactureFournisseurRec\setGeneratePdf(), FactureRec\setGeneratePdf(), setIncoterms(), User\SetInGroup(), FactureFournisseurRec\setMaxPeriod(), FactureRec\setMaxPeriod(), FichinterRec\setMaxPeriod(), FactureFournisseurRec\setModelPdf(), FactureRec\setModelPdf(), CommonObject\setMulticurrencyCode(), AdherentType\setMultiLangs(), Categorie\setMultiLangs(), Product\setMultiLangs(), Societe\setMysoc(), FactureFournisseurRec\setNextDate(), FactureRec\setNextDate(), FichinterRec\setNextDate(), BlockedLog\setObjectData(), ExpenseReport\setPaid(), Facture\setPaid(), FactureFournisseur\setPaid(), Societe\setParent(), Adherent\setPassword(), User\setPassword(), CommonObject\setPaymentMethods(), CommonObject\setPaymentTerms(), ProductCustomerPrice\setPriceOnAffiliateThirdparty(), Ticket\setProgression(), CommonObject\setProject(), Fichinter\setRefClient(), Facture\setRetainedWarranty(), Facture\setRetainedWarrantyDateLimit(), CommonObject\setRetainedWarrantyPaymentTerms(), CommonObject\setShippingMethod(), CommandeFournisseur\setStatus(), Contact\setstatus(), User\setstatus(), CommonObject\setStatut(), ProductFournisseur\setSupplierPriceExpression(), Adherent\setThirdPartyId(), Societe\setThirdpartyType(), CommonObject\setTransportMode(), ExpenseReport\setUnpaid(), Facture\setUnpaid(), FactureFournisseur\setUnpaid(), Adherent\setUserId(), setUserPassword(), Fichinter\setValid(), Project\setValid(), ExpenseReport\setValidate(), CommonObject\setValueFrom(), Conf\setValues(), FactureFournisseur\setVATReverseCharge(), CommonObject\setWarehouse(), show_actions_done(), show_contacts(), FormSms\show_form(), show_list_sending_receive(), ModeleBoxes\showBox(), FormFile\showdocuments(), CommonObject\showInputField(), ExtraFields\showInputField(), FormWebPortal\showInputField(), CommonObject\showOptionals(), ExtraFields\showOutputField(), FormWebPortal\showOutputFieldForObject(), societe_prepare_head(), BonPrelevement\SommeAPrelever(), Adherent\subscriptionComplementaryActions(), pdf_octopus\sumSituation(), CommonObject\swapContactStatus(), tax_by_rate(), tax_by_thirdparty(), top_htmlhead(), BookKeeping\transformTransaction(), tree_recur(), FormCompany\typent_array(), unActivateModule(), Ldap\unbind(), DiscountAbsolute\unlink_invoice(), Account\update(), AccountancyCategory\update(), AccountingAccount\update(), ActionComm\update(), Adherent\update(), AdherentType\update(), AdvanceTargetingMailing\update(), BankCateg\update(), BlockedLogAuthority\update(), BookKeeping\update(), Bookmark\update(), Categorie\update(), Cchargesociales\update(), Ccountry\update(), CGenericDic\update(), ChargeSociales\update(), CLeadStatus\update(), Commande\update(), CommandeFournisseur\update(), CommandeFournisseurLigne\update(), Comment\update(), Contact\update(), Contrat\update(), ContratLigne\update(), Cpaiement\update(), CProductNature\update(), Cregion\update(), Cronjob\update(), Cstate\update(), Ctypent\update(), Ctyperesource\update(), CUnits\update(), CurrencyRate\update(), Deplacement\update(), Dolresource\update(), Don\update(), EcmDirectory\update(), EcmFiles\update(), Entrepot\update(), Establishment\update(), Events\update(), Expedition\update(), ExpeditionLigne\update(), ExpenseReport\update(), ExpenseReportLine\update(), ExtraFields\update(), Facture\update(), FactureFournisseur\update(), FactureFournisseurLigneRec\update(), FactureFournisseurRec\update(), FactureLigne\update(), FactureLigneRec\update(), FactureRec\update(), Fichinter\update(), FichinterLigne\update(), Fiscalyear\update(), Holiday\update(), Ldap\update(), Link\update(), Loan\update(), LoanSchedule\update(), Localtax\update(), Mailing\update(), Menubase\update(), Opensurveysondage\update(), OrderLine\update(), PaymentDonation\update(), PaymentExpenseReport\update(), PaymentLoan\update(), PaymentSalary\update(), PaymentSocialContribution\update(), PaymentTerm\update(), PaymentVarious\update(), PaymentVAT\update(), PriceExpression\update(), PriceGlobalVariable\update(), PriceGlobalVariableUpdater\update(), Product\update(), ProductAttribute\update(), ProductAttributeValue\update(), Productbatch\update(), ProductCustomerPrice\update(), Productlot\update(), ProductStockEntrepot\update(), Project\update(), Propal\update(), PropaleLigne\update(), Propalmergepdfproduct\update(), Reception\update(), ReceptionLineBatch\update(), Salary\update(), Societe\update(), Subscription\update(), SupplierInvoiceLine\update(), SupplierProposalLine\update(), Task\update(), Ticket\update(), Tva\update(), User\update(), Website\update(), Account\update_bban(), ProductFournisseur\update_buyprice(), User\update_clicktodial(), Paiement\update_date(), Project\update_element(), Adherent\update_end_date(), Paiement\update_fk_bank(), PaymentDonation\update_fk_bank(), PaymentExpenseReport\update_fk_bank(), PaymentLoan\update_fk_bank(), PaymentSalary\update_fk_bank(), PaymentSocialContribution\update_fk_bank(), PaymentVAT\update_fk_bank(), ExtraFields\update_label(), User\update_last_login_date(), User\update_ldap2dolibarr(), MailingTargets\update_nb(), PriceGlobalVariableUpdater\update_next_update(), CommonObject\update_note(), Paiement\update_num(), Contact\update_perso(), CommonObject\update_ref_ext(), Product\update_sousproduit(), PriceGlobalVariableUpdater\update_status(), Contrat\update_statut(), ContratLigne\update_total(), FactureLigne\update_total(), FichinterLigne\update_total(), OrderLine\update_total(), PropaleLigne\update_total(), SupplierInvoiceLine\update_total(), SupplierProposalLine\update_total(), AccountancyCategory\updateAccAcc(), AssetAccountancyCodes\updateAccountancyCodes(), updateActionComm(), RemiseCheque\updateAmount(), Ldap\updateAttribute(), BookKeeping\updateByMvt(), CommonObject\updateCommon(), Holiday\updateConfCP(), updateContact(), AssetDepreciationOptions\updateDeprecationOptions(), Dolresource\updateElementResource(), CommonObject\updateExtraField(), ExtraFields\updateExtraField(), Setup\updateExtrafields(), updateInvoice(), Lettering\updateLettering(), BOM\updateLine(), ProductAttribute\updateLine(), Commande\updateline(), CommandeFournisseur\updateline(), Contrat\updateline(), Facture\updateline(), FactureFournisseur\updateline(), FactureFournisseurRec\updateline(), FactureRec\updateline(), Propal\updateline(), SupplierProposal\updateline(), FichinterRec\updateNbGenDone(), CommonObject\updateObjectLinked(), SupplierProposal\updateOrCreatePriceFournisseur(), updateOrder(), PaymentSalary\updatePaymentDate(), ProductAttribute\updatePositionOfAttribute(), Product\updatePrice(), updateProductOrService(), CommonObject\updateRangOfLine(), Holiday\updateSoldeCP(), updateThirdParty(), Task\updateTimeSpent(), Societe\useNPR(), user_prepare_head(), Societe\useRevenueStamp(), CashControl\valid(), Commande\valid(), CommandeFournisseur\valid(), Delivery\valid(), Expedition\valid(), Mailing\valid(), Propal\valid(), Reception\valid(), SupplierProposal\valid(), Adherent\validate(), AssetModel\validate(), Availabilities\validate(), BOM\validate(), Calendar\validate(), ConferenceOrBooth\validate(), ConferenceOrBoothAttendee\validate(), Contrat\validate(), Evaluation\validate(), EvaluationLine\validate(), Facture\validate(), FactureFournisseur\validate(), Holiday\validate(), Job\validate(), KnowledgeRecord\validate(), Mo\validate(), MyObject\validate(), Paiement\validate(), Partnership\validate(), Position\validate(), ProductFournisseurPrice\validate(), RecruitmentCandidature\validate(), RecruitmentJobPosition\validate(), RemiseCheque\validate(), Skill\validate(), Skilldet\validate(), SkillRank\validate(), StockTransfer\validate(), StockTransferLine\validate(), Target\validate(), TimeSpent\validate(), Societe\validateFamilyTree(), BookKeeping\validateMovementForFiscalPeriod(), validOrder(), mod_barcode_product_standard\verif(), mod_barcode_thirdparty_standard\verif(), mod_codeclient_elephant\verif(), mod_codeclient_leopard\verif(), mod_codeclient_monkey\verif(), mod_codecompta_aquarium\verif(), mod_codeproduct_elephant\verif(), mod_codeproduct_leopard\verif(), mod_contract_olive\verif(), mod_codeclient_monkey\verif_dispo(), mod_barcode_product_standard\verif_syntax(), mod_barcode_thirdparty_standard\verif_syntax(), Holiday\verifNbUsers(), Ticket\verify(), vignette(), doc_generic_asset_odt\write_file(), doc_generic_bom_odt\write_file(), doc_generic_contract_odt\write_file(), doc_generic_invoice_odt\write_file(), doc_generic_member_odt\write_file(), doc_generic_mo_odt\write_file(), doc_generic_myobject_odt\write_file(), doc_generic_odt\write_file(), doc_generic_order_odt\write_file(), doc_generic_product_odt\write_file(), doc_generic_project_odt\write_file(), doc_generic_proposal_odt\write_file(), doc_generic_reception_odt\write_file(), doc_generic_recruitmentjobposition_odt\write_file(), doc_generic_shipment_odt\write_file(), doc_generic_stock_odt\write_file(), doc_generic_supplier_invoice_odt\write_file(), doc_generic_supplier_order_odt\write_file(), doc_generic_supplier_proposal_odt\write_file(), doc_generic_task_odt\write_file(), doc_generic_ticket_odt\write_file(), doc_generic_user_odt\write_file(), doc_generic_usergroup_odt\write_file(), html_cerfafr\write_file(), pdf_azur\write_file(), pdf_crabe\write_file(), pdf_cyan\write_file(), pdf_eratosthene\write_file(), pdf_octopus\write_file(), pdf_paiement\write_file(), pdf_sepamandate\write_file(), pdf_sponge\write_file(), pdf_standard\write_file(), pdf_standard_asset\write_file(), pdf_standard_myobject\write_file(), pdf_standard_recruitmentjobposition\write_file(), CMailFile\write_files(), CMailFile\write_images(), CMailFile\write_mimeheaders(), CMailFile\write_smtpheaders(), modPhpbarcode\writeBarCode(), and modTcpdfbarcode\writeBarCode().

◆ dol_textishtml()

◆ dol_trunc()

dol_trunc ( $string,
$size = 40,
$trunc = 'right',
$stringencoding = 'UTF-8',
$nodot = 0,
$display = 0 )

Truncate a string to a particular length adding '…' if string larger than length.

If length = max length+1, we do no truncate to avoid having just 1 char replaced with '…'. MAIN_DISABLE_TRUNC=1 can disable all truncings

Parameters
string$stringString to truncate
int$sizeMax string size visible (excluding …). 0 for no limit. WARNING: Final string size can have 3 more chars (if we added …, or if size was max+1 so it does not worse to replace with ...)
string$truncWhere to trunc: 'right', 'left', 'middle' (size must be a 2 power), 'wrap'
string$stringencodingTell what is source string encoding
int$nodotTruncation do not add … after truncation. So it's an exact truncation.
int$displayTrunc is used to display data and can be changed for small screen. TODO Remove this param (must be dealt with CSS)
Returns
string Truncated string. WARNING: length is never higher than $size if $nodot is set, but can be 3 chars higher otherwise.

Definition at line 4686 of file functions.lib.php.

Referenced by Product\_get_stats(), pdf_aurore\_pagehead(), pdf_cyan\_pagehead(), pdf_eratosthene\_pagehead(), pdf_octopus\_pagehead(), pdf_soleil\_pagehead(), pdf_sponge\_pagehead(), pdf_standard_myobject\_pagehead(), pdf_standard_recruitmentjobposition\_pagehead(), pdf_standard_actions\_pages(), pdf_crabe\_tableau_info(), Facture\addline(), FormAdvTargetEmailing\advMultiselectarraySelllist(), Export\build_filterField(), BonPrelevement\buildRumNumber(), CommonInvoice\buildSwitzerlandQRString(), vCard\buildVCardString(), check_user_password_ldap(), Form\constructProductListOption(), ActionComm\create(), Events\create(), WebsitePage\create(), Stripe\createPaymentStripe(), dol_buildlogin(), pdf_octopus\drawInfoTable(), pdf_sponge\drawInfoTable(), BonPrelevement\EnregDestinataireSEPA(), BonPrelevement\EnregEmetteurSEPA(), mod_syslog_file\export(), mod_syslog_syslog\export(), AccountancyExport\exportBob50(), AccountancyExport\exportFEC(), AccountancyExport\exportFEC2(), AccountancyExport\exportGestimumV3(), AccountancyExport\exportGestimumV5(), AccountancyExport\exportLDCompta10(), AccountancyExport\exportWinfic(), mailing_advthirdparties\formFilter(), mailing_fraise\formFilter(), Translate\get_available_languages(), AccountingJournal\getAccountingAccountInfos(), AccountingJournal\getAssetData(), ConferenceOrBoothAttendee\getFullName(), getFullName(), RecruitmentCandidature\getFullName(), UserGroup\getFullName(), getListOfModels(), ActionComm\getNomUrl(), Adherent\getNomUrl(), AdherentType\getNomUrl(), Asset\getNomUrl(), Categorie\getNomUrl(), Contact\getNomUrl(), EcmDirectory\getNomUrl(), ExpenseReport\getNomUrl(), Facture\getNomUrl(), FactureFournisseur\getNomUrl(), FactureRec\getNomUrl(), Loan\getNomUrl(), PaymentDonation\getNomUrl(), PaymentExpenseReport\getNomUrl(), PaymentSocialContribution\getNomUrl(), PaymentVAT\getNomUrl(), Product\getNomUrl(), ProductFournisseur\getNomUrl(), Societe\getNomUrl(), User\getNomUrl(), WebPortalInvoice\getNomUrl(), WebPortalMember\getNomUrl(), Stripe\getPaymentIntent(), getRankOrderResults(), getSourceDocRef(), ImportCsv\import_insert(), ImportXlsx\import_insert(), FormFile\list_of_autoecmfiles(), FormFile\list_of_documents(), box_graph_product_distribution\loadBox(), box_members_by_tags\loadBox(), CommonInvoice\makeStripeSepaRequest(), FormAdvTargetEmailing\multiselectCountry(), FormAdvTargetEmailing\multiselectState(), EmailCollector\overwritePropertiesOfObject(), print_left_auguria_menu(), print_left_eldy_menu(), CommonObject\printOriginLine(), FormAccounting\select_account(), FormAccounting\select_accounting_category(), Form\select_all_categories(), FormContract\select_contract(), Form\select_country(), FormIntervention\select_interventions(), Form\select_produits_fournisseurs_list(), FormProjets\select_projects_list(), Form\select_remises(), Form\select_types_paiements(), FormResource\select_types_resource(), FormWebPortal\selectarray(), FormTicket\selectGroupTickets(), Form\selectInvoiceRec(), FormTicket\selectSeveritiesTickets(), FormProjets\selectTasks(), Form\selectTransportMode(), FormTicket\selectTypesTickets(), ActionComm\sendEmailsReminder(), CommonObject\setDocModel(), show_actions_done(), ModeleBoxes\showBox(), FormFile\showdocuments(), CommonObject\showInputField(), FormWebPortal\showInputField(), ExtraFields\showOutputField(), FormWebPortal\showOutputFieldForObject(), Societe\thirdparty_and_contact_email_array(), Societe\thirdparty_and_contact_phone_array(), Translate\trans(), AccountancyExport\trunc(), CompanyBankAccount\update(), WebsitePage\update(), pdf_beluga\write_file(), and pdf_standard\write_file().

◆ dol_ucfirst()

dol_ucfirst ( $string,
$encoding = "UTF-8" )

Convert first character of the first word of a string to upper.

Never use ucfirst because it does not works with UTF8 strings.

Parameters
string$stringString to encode
string$encodingCharacter set encodign
Returns
string String converted
See also
dol_strtoupper(), dol_ucwords()

Definition at line 2072 of file functions.lib.php.

◆ dol_ucwords()

dol_ucwords ( $string,
$encoding = "UTF-8" )

Convert first character of all the words of a string to upper.

Parameters
string$stringString to encode
string$encodingCharacter set encodign
Returns
string String converted
See also
dol_strtoupper(), dol_ucfirst()

Definition at line 2089 of file functions.lib.php.

◆ dol_user_country()

dol_user_country ( )

Return country code for current user.

If software is used inside a local network, detection may fails (we need a public ip)

Returns
string Country code (fr, es, it, us, ...)

Definition at line 4431 of file functions.lib.php.

◆ dol_validElement()

dol_validElement ( $element)

Return if var element is ok.

Parameters
string$elementVariable to check
Returns
boolean Return true of variable is not empty
See also
getElementProperties()

Definition at line 10458 of file functions.lib.php.

◆ dolButtonToOpenExportDialog()

dolButtonToOpenExportDialog ( $name,
$label,
$buttonstring,
$exportSiteName,
$overwriteGitUrl,
$website )

Create a dialog with two buttons for export and overwrite of a website.

Parameters
string$nameUnique identifier for the dialog
string$labelTitle of the dialog
string$buttonstringText for the button that opens the dialog
string$exportSiteNameName of the "submit" input for site export
string$overwriteGitUrlURL for the link that triggers the overwrite action in GIT
Website$websiteWebsite object
Returns
string HTML and JavaScript code for the button and the dialog

Definition at line 2247 of file functions.lib.php.

◆ dolButtonToOpenUrlInDialogPopup()

dolButtonToOpenUrlInDialogPopup ( $name,
$label,
$buttonstring,
$url,
$disabled = '',
$morecss = 'classlink button bordertransp',
$jsonopen = '',
$backtopagejsfields = '',
$accesskey = '' )

Return HTML code to output a button to open a dialog popup box.

Such buttons must be included inside a HTML form.

Parameters
string$nameA name for the html component
string$labelLabel shown in Popup title top bar
string$buttonstringbutton string (HTML text we can click on)
string$urlRelative Url to open. For example '/project/card.php'
string$disabledDisabled text
string$morecssMore CSS
string$jsonopenSome JS code to execute on click/open of popup
string$backtopagejsfieldsThe back to page must be managed using javascript instead of a redirect. Value is 'keyforpopupid:Name_of_html_component_to_set_with id,Name_of_html_component_to_set_with_label'
string$accesskeyA key to use shortcut
Returns
string HTML component with button

Definition at line 2341 of file functions.lib.php.

Referenced by top_menu_user().

◆ dolCheckFilters()

dolCheckFilters ( $sqlfilters,
& $error = '',
& $parenthesislevel = 0 )

Return if a $sqlfilters parameter has a valid balance of parenthesis.

Parameters
string$sqlfiltersUniversal SQL filter string. Must have been trimmed before.
string$errorReturned error message
int$parenthesislevelReturned level of global parenthesis that we can remove/simplify, 0 if error or we can't simplify.
Returns
boolean True if valid, False if not valid ($error returned parameter is filled with the reason in such a case)
See also
forgeSQLFromUniversalSearchCriteria()

Definition at line 13476 of file functions.lib.php.

Referenced by DolibarrApi\_checkFilters().

◆ dolChmod()

dolChmod ( $filepath,
$newmask = '' )

Change mod of a file.

Parameters
string$filepathFull file path
string$newmaskForce new mask. For example '0644'
Returns
void

Definition at line 7768 of file functions.lib.php.

Referenced by build_calfile(), ActionComm\build_exportfile(), build_rssfile(), vCard\buildVCardString(), Website\checkPreviousState(), Utils\compressSyslogs(), dol_copy(), dol_delete_file(), dol_filecache(), dol_imageResizeOrCrop(), dol_meta_create(), dol_move(), dol_move_uploaded_file(), dolReplaceInFile(), dolSaveCssFile(), dolSaveHtaccessFile(), dolSaveHtmlHeader(), dolSaveIndexPage(), dolSaveJsFile(), dolSaveLicense(), dolSaveManifestJson(), dolSaveMasterFile(), dolSavePageAlias(), dolSavePageContent(), dolSaveReadme(), dolSaveRobotFile(), Ldap\dump(), CMailFile\dump_mail(), CSMSFile\dump_sms(), CSMSFile\dump_sms_result(), Utils\dumpDatabase(), Utils\executeCLI(), mod_syslog_file\export(), Website\exportWebSite(), CMailFile\findHtmlImagesIsSrcData(), BonPrelevement\generate(), Stats\getAllByProductEntry(), getAllImages(), Stats\getAmountByMonthWithPrevYear(), Stats\getNbByMonthWithPrevYear(), ProjectStats\getTransformRateByMonthWithPrevYear(), ProjectStats\getWeightedAmountByMonthWithPrevYear(), ICal\parse(), RssParser\parser(), Documents\post(), rebuild_merge_pdf(), rebuildObjectClass(), rebuildObjectSql(), Website\replaceLineUsingNum(), CMailFile\save_dump_mail_in_err(), html_generic\saveFile(), vignette(), BordereauChequeBlochet\write_file(), doc_generic_asset_odt\write_file(), doc_generic_bom_odt\write_file(), doc_generic_contract_odt\write_file(), doc_generic_invoice_odt\write_file(), doc_generic_member_odt\write_file(), doc_generic_mo_odt\write_file(), doc_generic_myobject_odt\write_file(), doc_generic_odt\write_file(), doc_generic_order_odt\write_file(), doc_generic_product_odt\write_file(), doc_generic_project_odt\write_file(), doc_generic_proposal_odt\write_file(), doc_generic_reception_odt\write_file(), doc_generic_recruitmentjobposition_odt\write_file(), doc_generic_shipment_odt\write_file(), doc_generic_stock_odt\write_file(), doc_generic_supplier_invoice_odt\write_file(), doc_generic_supplier_order_odt\write_file(), doc_generic_supplier_proposal_odt\write_file(), doc_generic_task_odt\write_file(), doc_generic_ticket_odt\write_file(), doc_generic_user_odt\write_file(), doc_generic_usergroup_odt\write_file(), html_cerfafr\write_file(), pdf_aurore\write_file(), pdf_azur\write_file(), pdf_baleine\write_file(), pdf_ban\write_file(), pdf_beluga\write_file(), pdf_canelle\write_file(), pdf_cornas\write_file(), pdf_crabe\write_file(), pdf_cyan\write_file(), pdf_eagle\write_file(), pdf_eagle_proforma\write_file(), pdf_einstein\write_file(), pdf_eratosthene\write_file(), pdf_espadon\write_file(), pdf_merou\write_file(), pdf_muscadet\write_file(), pdf_octopus\write_file(), pdf_paiement\write_file(), pdf_rouget\write_file(), pdf_sepamandate\write_file(), pdf_soleil\write_file(), pdf_sponge\write_file(), pdf_squille\write_file(), pdf_standard\write_file(), pdf_standard\write_file(), pdf_standard\write_file(), pdf_standard\write_file(), pdf_standard_actions\write_file(), pdf_standard_asset\write_file(), pdf_standard_myobject\write_file(), pdf_standard_recruitmentjobposition\write_file(), pdf_standardlabel\write_file(), pdf_storm\write_file(), pdf_strato\write_file(), pdf_tcpdflabel\write_file(), pdf_timespent\write_file(), pdf_typhon\write_file(), pdf_vinci\write_file(), and pdf_zenith\write_file().

◆ dolExplodeIntoArray()

dolExplodeIntoArray ( $string,
$delimiter = ';',
$kv = '=' )

Split a string with 2 keys into key array.

For example: "A=1;B=2;C=2" is exploded into array('A'=>'1','B'=>'2','C'=>'3')

Parameters
?string$stringString to explode
string$delimiterDelimiter between each couple of data. Example: ';' or '[
;]+' or '(
\r|\r|
|;)'
string$kvDelimiter between key and value
Returns
array<string,string> Array of data exploded

Definition at line 11203 of file functions.lib.php.

Referenced by EmailCollector\overwritePropertiesOfObject().

◆ dolForgeCriteriaCallback()

dolForgeCriteriaCallback ( $matches)

Function to forge a SQL criteria from a Dolibarr filter syntax string.

This method is called by forgeSQLFromUniversalSearchCriteria()

Parameters
string[]$matchesArray of found string by regex search. Example: "t.ref:like:'SO-%'" or "t.date_creation:<:'20160101'" or "t.date_creation:<:'2016-01-01 12:30:00'" or "t.nature:is:NULL"
Returns
string Forged criteria. Example: "t.field LIKE 'abc%'"

Definition at line 13558 of file functions.lib.php.

Referenced by DolibarrApi\_forge_criteria_callback().

◆ dolForgeDummyCriteriaCallback()

dolForgeDummyCriteriaCallback ( $matches)

Function to forge a SQL criteria from a Dolibarr filter syntax string.

This method is called by forgeSQLFromUniversalSearchCriteria()

Parameters
string[]$matchesArray of found string by regex search. Example: "t.ref:like:'SO-%'" or "t.date_creation:<:'20160101'" or "t.nature:is:NULL"
Returns
string Forged criteria. Example: "" or "()"

Definition at line 13536 of file functions.lib.php.

◆ dolForgeExplodeAnd()

dolForgeExplodeAnd ( $sqlfilters)

Explode an universal search string with AND parts.

This is used to output the search criteria in an UFS (Universal Filter Syntax) input component.

Parameters
string$sqlfiltersUniversal SQL filter string. Must have been trimmed before.
Returns
string[] Array of AND

Definition at line 13409 of file functions.lib.php.

Referenced by Form\searchComponent().

◆ dolGetBadge()

dolGetBadge ( $label,
$html = '',
$type = 'primary',
$mode = '',
$url = '',
$params = array() )

Function dolGetBadge.

Parameters
string$labellabel of badge no html : use in alt attribute for accessibility
string$htmloptional : label of badge with html
string$typetype of badge : Primary Secondary Success Danger Warning Info Light Dark status0 status1 status2 status3 status4 status5 status6 status7 status8 status9
''|'pill'|'dot'$mode Default '' , 'pill', 'dot'
string$urlthe url for link
array<string,mixed>$params Various params for future : recommended rather than adding more function arguments. array('attr'=>array('title'=>'abc'))
Returns
string Html badge

Definition at line 12092 of file functions.lib.php.

◆ dolGetButtonAction()

dolGetButtonAction ( $label,
$text = '',
$actionType = 'default',
$url = '',
$id = '',
$userRight = 1,
$params = array() )

Function dolGetButtonAction.

Parameters
string$labelLabel or tooltip of button if $text is provided. Also used as tooltip in title attribute. Can be escaped HTML content or full simple text.
string$textOptional : short label on button. Can be escaped HTML content or full simple text.
string$actionType'default', 'danger', 'email', 'clone', 'cancel', 'delete', ...
string|array<int,array{lang:string,enabled:bool,perm:bool,label:string,url:string,urlroot:string}>$url Url for link or array of subbutton description
                                                                                                                         Example when an array is used:
                                                                                                                         $arrayforbutaction = array(
                                                                                                                         10 => array('attr' => array('class'=>''), 'lang'=>'propal', 'enabled'=>isModEnabled("propal"), 'perm'=>$user->hasRight('propal', 'creer'), 'label' => 'AddProp', 'url'=>'/comm/propal/card.php?action=create&amp;projectid='.$object->id.'&amp;socid='.$object->socid),
                                                                                                                         20 => array('attr' => array('class'=>''), 'lang'=>'mymodule', 'enabled'=>isModEnabled("mymodule"), 'perm'=>$user->hasRight('mymodule', 'write'), 'label' => 'MyModuleAction', 'urlroot'=>dol_build_patch('/mymodule/mypage.php?action=create')),
                                                                                                                         );                                                                                                               );
string$idAttribute id of action button. Example 'action-delete'. This can be used for full ajax confirm if this code is reused into the ->formconfirm() method.
int | boolean$userRightUser action right // phpcs:disable
array<string,mixed>$params = [ // Various params for future : recommended rather than adding more function arguments 'attr' => [ // to add or override button attributes 'xxxxx' => '', // your xxxxx attribute you want 'class' => 'reposition', // to add more css class to the button class attribute 'classOverride' => '' // to replace class attribute of the button ], 'confirm' => [ 'url' => 'http://', // Override Url to go when user click on action btn, if empty default url is $url.?confirm=yes, for no js compatibility use $url for fallback confirm. 'title' => '', // Override title of modal, if empty default title use "ConfirmBtnCommonTitle" lang key 'action-btn-label' => '', // Override label of action button, if empty default label use "Confirm" lang key 'cancel-btn-label' => '', // Override label of cancel button, if empty default label use "CloseDialog" lang key 'content' => '', // Override text of content, if empty default content use "ConfirmBtnCommonContent" lang key 'modal' => true, // true|false to display dialog as a modal (with dark background) 'isDropDrown' => false, // true|false to display dialog as a dropdown list (css dropdown-item with dark background) ], ] // phpcs:enable
Returns
string html button

Definition at line 12287 of file functions.lib.php.

Referenced by displayPositionCard().

◆ dolGetButtonTitle()

dolGetButtonTitle ( $label,
$helpText = '',
$iconClass = 'fa fa-file',
$url = '',
$id = '',
$status = 1,
$params = array() )

Function dolGetButtonTitle : this kind of buttons are used in title in list.

Parameters
string$labellabel of button
string$helpTextoptional : content for help tooltip
string$iconClassclass for icon element (Example: 'fa fa-file')
string$urlthe url for link
string$idattribute id of button
int<-2,2>$status 0 no user rights, 1 active, 2 current action or selected, -1 Feature Disabled, -2 disable Other reason use param $helpText as tooltip help
array<string,mixed>$params various parameters for future : recommended rather than adding more function arguments
Returns
string html button

Definition at line 12530 of file functions.lib.php.

Referenced by show_contacts(), show_contacts_projects(), show_projects(), and FormActions\showactions().

◆ dolGetButtonTitleSeparator()

dolGetButtonTitleSeparator ( $moreClass = "")

Add space between dolGetButtonTitle.

Parameters
string$moreClassmore css class label
Returns
string html of title separator

Definition at line 12495 of file functions.lib.php.

◆ dolGetCountryCodeFromIp()

dolGetCountryCodeFromIp ( $ip)

Return a country code from IP.

Empty string if not found.

Parameters
string$ipIP
Returns
string Country code ('us', 'fr', ...)

Definition at line 4405 of file functions.lib.php.

◆ dolGetFirstLastname()

dolGetFirstLastname ( $firstname,
$lastname,
$nameorder = -1 )

Return firstname and lastname in correct order.

Parameters
string$firstnameFirstname
string$lastnameLastname
int$nameorder-1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname, 2=Firstname, 3=Firstname if defined else lastname, 4=Lastname, 5=Lastname if defined else firstname
Returns
string Firstname + lastname or Lastname + firstname

Definition at line 9641 of file functions.lib.php.

Referenced by pdf_standard\_pagehead(), MailmanSpip\add_to_spip(), ActionComm\build_exportfile(), Societe\contact_array(), Societe\contact_get_property(), Societe\contact_property_array(), Tickets\getCommon(), ConferenceOrBoothAttendee\getFullName(), getFullName(), RecruitmentCandidature\getFullName(), UserGroup\getFullName(), mod_expensereport_jade\getNextValue(), ExpenseReportRule\getUserName(), Ticket\newMessage(), InterfaceTicketEmail\runTrigger(), FormAccounting\select_auxaccount(), Notify\send(), BonPrelevement\set_infotrans(), and User\user_get_property().

◆ dolGetFirstLetters()

dolGetFirstLetters ( $s,
$nbofchar = 1 )

Return first letters of a strings.

Example with nbofchar=1: 'ghi' will return 'g' but 'abc def' will return 'ad' Example with nbofchar=2: 'ghi' will return 'gh' but 'abc def' will return 'abde'

Parameters
string$sString to truncate
int$nbofcharNb of characters to keep
Returns
string Return first chars.

Definition at line 4605 of file functions.lib.php.

Referenced by Adherent\getmorphylib().

◆ dolGetFirstLineOfText()

dolGetFirstLineOfText ( $text,
$nboflines = 1,
$charset = 'UTF-8' )

Return first line of text.

Cut will depends if content is HTML or not.

Parameters
string$textInput text
int$nboflinesNb of lines to get (default is 1 = first line only)
string$charsetCharset of $text string (UTF-8 by default)
Returns
string Output text
See also
dol_nboflines_bis(), dol_string_nohtmltag(), dol_escape_htmltag()

Definition at line 8062 of file functions.lib.php.

Referenced by pdf_standard_actions\_pages(), FormMail\get_form(), KnowledgeRecord\getKanbanView(), ActionComm\getNomUrl(), Skill\getNomUrl(), ActionComm\getTooltipContentArray(), and Product\getTooltipContentArray().

◆ dolGetStatus()

dolGetStatus ( $statusLabel = '',
$statusLabelShort = '',
$html = '',
$statusType = 'status0',
$displayMode = 0,
$url = '',
$params = array() )

Output the badge of a status.

Parameters
string$statusLabelLabel of badge no html : use in alt attribute for accessibility
string$statusLabelShortShort label of badge no html
string$htmlOptional : label of badge with html
string$statusTypestatus0 status1 status2 status3 status4 status5 status6 status7 status8 status9 : image name or badge name
int<0,6>$displayMode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto
string$urlThe url for link
array<string,mixed>$params Various params. Example: array('tooltip'=>'no|...', 'badgeParams'=>...)
Returns
string Html status string

Definition at line 12161 of file functions.lib.php.

◆ dolIsAllowedForPreview()

dolIsAllowedForPreview ( $file)

Return if a file is qualified for preview.

Parameters
string$fileFilename we looking for information
Returns
int<0,1> 1 If allowed, 0 otherwise
See also
dol_mimetype(), image_format_supported() from images.lib.php

Definition at line 11605 of file functions.lib.php.

Referenced by DocumentController\init(), and Form\showphoto().

◆ dolPrintHTML()

dolPrintHTML ( $s,
$allowiframe = 0 )

Return a string (that can be on several lines) ready to be output on a HTML page.

To output a text inside an attribute, you can use dolPrintHTMLForAttribute() or dolPrintHTMLForTextArea() inside a textarea

Parameters
string$sString to print
int$allowiframeAllow iframe tags
Returns
string String ready for HTML output (sanitized and escape)
See also
dolPrintHTMLForAttribute(), dolPrintHTMLFortextArea()

Definition at line 1871 of file functions.lib.php.

Referenced by RecruitmentCandidature\getKanbanView(), show_contacts(), and ActionsTicket\viewTicketOriginalMessage().

◆ dolPrintHTMLForAttribute()

dolPrintHTMLForAttribute ( $s)

Return a string ready to be output on an HTML attribute (alt, title, data-html, ...)

Parameters
string$sString to print
Returns
string String ready for HTML output
See also
dolPrintHTML(), dolPrintHTMLFortextArea()

Definition at line 1883 of file functions.lib.php.

◆ dolPrintHTMLForTextArea()

dolPrintHTMLForTextArea ( $s,
$allowiframe = 0 )

Return a string ready to be output on input textarea.

Parameters
string$sString to print
int$allowiframeAllow iframe tags
Returns
string String ready for HTML output into a textarea
See also
dolPrintHTML(), dolPrintHTMLForAttribute()

Definition at line 1898 of file functions.lib.php.

◆ dolPrintLabel()

dolPrintLabel ( $s)

Return a string label (so on 1 line only and that should not contains any HTML) ready to be output on HTML page To use text that is not HTML content inside an attribute, use can simply only dol_escape_htmltag().

In doubt, use dolPrintHTMLForAttribute().

Parameters
string$sString to print
Returns
string String ready for HTML output

Definition at line 1857 of file functions.lib.php.

◆ dolPrintPassword()

dolPrintPassword ( $s)

Return a string ready to be output on an HTML attribute (alt, title, ...)

Parameters
string$sString to print
Returns
string String ready for HTML output

Definition at line 1909 of file functions.lib.php.

◆ fetchObjectByElement()

fetchObjectByElement ( $element_id,
$element_type,
$element_ref = '',
$useCache = 0,
$maxCacheByType = 10 )

Fetch an object from its id and element_type Inclusion of classes is automatic.

Parameters
int$element_idElement id (Use this or element_ref but not both. If id and ref are empty, object with no fetch is returned)
string$element_typeElement type ('module' or 'myobject@mymodule' or 'mymodule_myobject')
string$element_refElement ref (Use this or element_id but not both. If id and ref are empty, object with no fetch is returned)
int<0,2>$useCache If you want to store object in cache or get it from cache 0 => no use cache , 1 use cache, 2 force reload cache
int$maxCacheByTypeNumber of object in cache for this element type
Returns
int<-1,0>|object object || 0 || <0 if error
See also
getElementProperties()

Definition at line 12990 of file functions.lib.php.

Referenced by FileUpload\__construct(), Dolresource\fetchElementResource(), and Dolresource\fetchElementResources().

◆ fieldLabel()

fieldLabel ( $langkey,
$fieldkey,
$fieldrequired = 0 )

Show a string with the label tag dedicated to the HTML edit field.

Parameters
string$langkeyTranslation key
string$fieldkeyKey of the html select field the text refers to
int$fieldrequired1=Field is mandatory
Returns
string
Deprecated
Form\editfieldkey

Definition at line 3052 of file functions.lib.php.

◆ finishSimpleTable()

finishSimpleTable ( $addLineBreak = false)

Add the correct HTML close tags for "startSimpleTable(...)" (use after the last table line)

Parameters
bool$addLineBreak(optional) Add a extra line break after the complete table (<br>)
Returns
void
See also
startSimpleTable()

Definition at line 13178 of file functions.lib.php.

◆ forgeSQLFromUniversalSearchCriteria()

forgeSQLFromUniversalSearchCriteria ( $filter,
& $errorstr = '',
$noand = 0,
$nopar = 0,
$noerror = 0 )

forgeSQLFromUniversalSearchCriteria

Parameters
string$filterString with universal search string. Must be '(aaa:bbb:ccc) OR (ddd:eeee:fff) ...' with aaa is a field name (with alias or not) and bbb is one of this operator '=', '<', '>', '<=', '>=', '!=', 'in', 'notin', 'like', 'notlike', 'is', 'isnot'. ccc must not contains ( or ) Example: '((client:=:1) OR ((client:>=:2) AND (client:<=:3))) AND (client:!=:8) AND (nom:like:'a')'
string$errorstrError message string
int<0,1>$noand 1=Do not add the AND before the condition string.
int<0,1>$nopar 1=Do not add the parenthesis around the final condition string.
int<0,1>$noerror 1=If search criteria is not valid, does not return an error string but invalidate the SQL
Returns
string Return forged SQL string
See also
dolSqlDateFilter()
natural_search()

Definition at line 13352 of file functions.lib.php.

Referenced by WebsitePage\countAll(), CommonObject\deleteByParentField(), Asset\fetchAll(), AssetModel\fetchAll(), Availabilities\fetchAll(), BOM\fetchAll(), BOMLine\fetchAll(), BookKeeping\fetchAll(), Calendar\fetchAll(), CGenericDic\fetchAll(), CLeadStatus\fetchAll(), ConferenceOrBooth\fetchAll(), ConferenceOrBoothAttendee\fetchAll(), CProductNature\fetchAll(), Cronjob\fetchAll(), CTicketCategory\fetchAll(), Ctyperesource\fetchAll(), CUnits\fetchAll(), DefaultValues\fetchAll(), Dolresource\fetchAll(), EcmFiles\fetchAll(), Evaluation\fetchAll(), EvaluationLine\fetchAll(), Hook\fetchAll(), Job\fetchAll(), KnowledgeRecord\fetchAll(), Mo\fetchAll(), MoLine\fetchAll(), MyObject\fetchAll(), Opensurveysondage\fetchAll(), Partnership\fetchAll(), PartnershipType\fetchAll(), Position\fetchAll(), ProductCustomerPrice\fetchAll(), ProductFournisseurPrice\fetchAll(), ProductStockEntrepot\fetchAll(), ReceptionLineBatch\fetchAll(), RecruitmentCandidature\fetchAll(), RecruitmentJobPosition\fetchAll(), Skill\fetchAll(), Skilldet\fetchAll(), SkillRank\fetchAll(), StockTransfer\fetchAll(), StockTransferLine\fetchAll(), Target\fetchAll(), Ticket\fetchAll(), TimeSpent\fetchAll(), User\fetchAll(), Website\fetchAll(), WebsitePage\fetchAll(), Workstation\fetchAll(), BookKeeping\fetchAllBalance(), Products\getAttributes(), Setup\getAvailability(), BankAccounts\getLines(), Proposals\getLines(), Setup\getListOfCivilities(), Setup\getListOfContactTypes(), Setup\getListOfCountries(), Setup\getListOfCurrencies(), Setup\getListOfEventTypes(), Setup\getListOfExpenseReportsTypes(), Setup\getListOfExtrafields(), Setup\getListOfLegalForm(), Setup\getListOfMeasuringUnits(), Setup\getListOfsocialNetworks(), Setup\getListOfStaff(), Setup\getListOfStates(), Setup\getListOfTowns(), Categorie\getObjectsInCateg(), Setup\getOrderingMethods(), Setup\getOrderingOrigins(), Setup\getPaymentTerms(), Setup\getPaymentTypes(), Project\getProjectsAuthorizedForUser(), Setup\getShippingModes(), Products\getSupplierProducts(), Setup\getTicketsCategories(), Setup\getTicketsSeverities(), Setup\getTicketsTypes(), AgendaEvents\index(), BankAccounts\index(), Boms\index(), Categories\index(), Contacts\index(), Contracts\index(), Donations\index(), ExpenseReports\index(), Interventions\index(), Invoices\index(), KnowledgeManagement\index(), Members\index(), Mos\index(), MyModuleApi\index(), Orders\index(), Partnerships\index(), Products\index(), Projects\index(), Proposals\index(), Receptions\index(), Shipments\index(), StockMovements\index(), Subscriptions\index(), SupplierInvoices\index(), SupplierOrders\index(), SupplierProposals\index(), Tasks\index(), Thirdparties\index(), Tickets\index(), Users\index(), Warehouses\index(), Workstations\index(), Zapier\index(), Recruitments\indexCandidature(), Recruitments\indexJobPosition(), Members\indexType(), Users\listGroups(), CommonObject\load_previous_next_ref(), Form\searchComponent(), Form\select_thirdparty_list(), Form\selectcontacts(), FormWebPortal\selectForFormsList(), CommonObject\showInputField(), and ExtraFields\showInputField().

◆ get_date_range()

get_date_range ( $date_start,
$date_end,
$format = '',
$outputlangs = null,
$withparenthesis = 1 )

Format output for start and end date.

Parameters
int$date_startStart date
int$date_endEnd date
string$formatOutput date format ('day', 'dayhour', ...)
Translate$outputlangsOutput language
integer$withparenthesis1=Add parenthesis, 0=no parenthesis
Returns
string String

Definition at line 9610 of file functions.lib.php.

Referenced by box_members_last_subscriptions\loadBox(), and CommonObject\printOriginLine().

◆ get_default_localtax()

get_default_localtax ( $thirdparty_seller,
$thirdparty_buyer,
$local,
$idprod = 0 )

Function that return localtax of a product line (according to seller, buyer and product vat rate) If the seller is not subject to VAT, then default VAT=0.

Rule/Test ends. If (seller country == buyer country) default VAT=sold product VAT. Rule/Test ends. Else, default VAT=0. Rule/Test ends

Parameters
Societe$thirdparty_sellerThird party seller
Societe$thirdparty_buyerThird party buyer
int$localLocaltax to process (1 or 2)
int$idprodId product
Returns
int localtax, -1 if it can not be determined
See also
get_default_tva(), get_default_npr()

Definition at line 7514 of file functions.lib.php.

◆ get_default_npr()

get_default_npr ( Societe $thirdparty_seller,
Societe $thirdparty_buyer,
$idprod = 0,
$idprodfournprice = 0 )

Function that returns whether VAT must be recoverable collected VAT (e.g.: VAT NPR in France)

Parameters
Societe$thirdparty_sellerThirdparty seller
Societe$thirdparty_buyerThirdparty buyer
int$idprodId product
int$idprodfournpriceId supplier price for product
Returns
float 0 or 1
See also
get_default_tva(), get_default_localtax()

Definition at line 7478 of file functions.lib.php.

Referenced by Commande\add_product(), Propal\add_product(), SupplierProposal\add_product(), Product\getSellPrice(), and Form\load_tva().

◆ get_default_tva()

get_default_tva ( Societe $thirdparty_seller,
Societe $thirdparty_buyer,
$idprod = 0,
$idprodfournprice = 0 )

Function that return vat rate of a product line (according to seller, buyer and product vat rate) VATRULE 1: If seller does not use VAT, default VAT is 0.

End of rule. VATRULE 2: If the (seller country = buyer country) then the default VAT = VAT of the product sold. End of rule. VATRULE 3: If (seller and buyer in the European Community) and (property sold = new means of transport such as car, boat, plane) then VAT by default = 0 (VAT must be paid by the buyer to the tax center of his country and not to the seller). End of rule. VATRULE 4: If (seller and buyer in the European Community) and (buyer = individual) then VAT by default = VAT of the product sold. End of rule VATRULE 5: If (seller and buyer in European Community) and (buyer = company) then VAT by default=0. End of rule VATRULE 6: Otherwise the VAT proposed by default=0. End of rule.

Parameters
Societe$thirdparty_sellerObject Seller company
Societe$thirdparty_buyerObject Buyer company
int$idprodId product
int$idprodfournpriceId product_fournisseur_price (for supplier order/invoice)
Returns
float|string Vat rate to use with format 5.0 or '5.0 (XXX)', -1 if we can't guess it
See also
get_default_localtax(), get_default_npr()

Definition at line 7362 of file functions.lib.php.

Referenced by Commande\add_product(), Propal\add_product(), SupplierProposal\add_product(), Propal\createFromClone(), Product\getSellPrice(), Form\load_tva(), Adherent\subscriptionComplementaryActions(), and