dolibarr  20.0.0-alpha
Functions
inc.php File Reference

File that define environment for support pages. More...

Go to the source code of this file.

Functions

 usage ($program, $header)
 Print the usage when executing scripts from install/. More...
 
 conf ($dolibarr_main_document_root)
 Load conf file (file must exists) More...
 
 pHeader ($subtitle, $next, $action='set', $param='', $forcejqueryurl='', $csstable='main-inside')
 Show HTML header of install pages. More...
 
 pFooter ($nonext=0, $setuplang='', $jscheckfunction='', $withpleasewait=0, $morehtml='')
 Print HTML footer of install pages. More...
 
 dolibarr_install_syslog ($message, $level=LOG_DEBUG)
 Log function for install pages. More...
 
 detect_dolibarr_main_document_root ()
 Automatically detect Dolibarr's main document root. More...
 
 detect_dolibarr_main_data_root ($dolibarr_main_document_root)
 Automatically detect Dolibarr's main data root. More...
 
 detect_dolibarr_main_url_root ()
 Automatically detect Dolibarr's main URL root. More...
 
 parse_database_login ($force_install_databaserootlogin)
 Replaces automatic database login by actual value. More...
 
 parse_database_pass ($force_install_databaserootpass)
 Replaces automatic database password by actual value. More...
 

Detailed Description

File that define environment for support pages.

Definition in file inc.php.

Function Documentation

◆ conf()

conf (   $dolibarr_main_document_root)

Load conf file (file must exists)

Parameters
string$dolibarr_main_document_rootRoot directory of Dolibarr bin files
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 419 of file inc.php.

Referenced by User\__construct(), modGeneratePassNone\__construct(), modGeneratePassPerso\__construct(), and modGeneratePassStandard\__construct().

◆ detect_dolibarr_main_data_root()

detect_dolibarr_main_data_root (   $dolibarr_main_document_root)

Automatically detect Dolibarr's main data root.

Parameters
string$dolibarr_main_document_rootCurrent main document root
Returns
string

Definition at line 721 of file inc.php.

◆ detect_dolibarr_main_document_root()

detect_dolibarr_main_document_root ( )

Automatically detect Dolibarr's main document root.

Returns
string

Definition at line 697 of file inc.php.

◆ detect_dolibarr_main_url_root()

detect_dolibarr_main_url_root ( )

Automatically detect Dolibarr's main URL root.

Returns
string

Definition at line 733 of file inc.php.

◆ dolibarr_install_syslog()

dolibarr_install_syslog (   $message,
  $level = LOG_DEBUG 
)

Log function for install pages.

Parameters
string$messageMessage
int$levelLevel of log
Returns
void

Definition at line 684 of file inc.php.

◆ parse_database_login()

parse_database_login (   $force_install_databaserootlogin)

Replaces automatic database login by actual value.

Parameters
string$force_install_databaserootloginLogin
Returns
string

Definition at line 766 of file inc.php.

◆ parse_database_pass()

parse_database_pass (   $force_install_databaserootpass)

Replaces automatic database password by actual value.

Parameters
string$force_install_databaserootpassPassword
Returns
string

Definition at line 777 of file inc.php.

◆ pFooter()

pFooter (   $nonext = 0,
  $setuplang = '',
  $jscheckfunction = '',
  $withpleasewait = 0,
  $morehtml = '' 
)

Print HTML footer of install pages.

Parameters
integer$nonext1=No button "Next step", 2=Show button but disabled with a link to enable
string$setuplangLanguage code
string$jscheckfunctionAdd a javascript check function
integer$withpleasewaitAdd also please wait tags
string$morehtmlAdd more HTML content
Returns
void

Definition at line 623 of file inc.php.

◆ pHeader()

pHeader (   $subtitle,
  $next,
  $action = 'set',
  $param = '',
  $forcejqueryurl = '',
  $csstable = 'main-inside' 
)

Show HTML header of install pages.

Parameters
string$subtitleTitle
string$nextNext
string$actionAction code ('set' or 'upgrade')
string$paramParam
string$forcejqueryurlSet jquery relative URL (must end with / if defined)
string$csstableCss for table
Returns
void

Definition at line 534 of file inc.php.

◆ usage()

usage (   $program,
  $header 
)

Print the usage when executing scripts from install/.

Print the help text exposing the available options when executing update or install script (ie. from htdocs/install/) from CLI with the php executable. This function does not exit the program and the caller should then call exit themselves since they should determine whether it was an error or not.

Parameters
string$programthe script that was originally run
string$headerthe message to signal to the user
Returns
void
Parameters
string$arg
Returns
bool

Previx option with '-' for single characters and – for more than single characters

Parameters
string$arg
Returns
string

Definition at line 94 of file inc.php.