[ Index ]

PHP Cross Reference of DokuWiki




/inc/ -> init.php (summary)

Initialize some defaults needed for DokuWiki

File Size: 663 lines (19 kb)
Included or required: 27 times
Referenced: 0 times
Includes or requires: 3 files

Defines 12 functions


Functions that are not part of a class:

delta_time($start = 0)   X-Ref
timing Dokuwiki execution

return: mixed
param: integer $start

init_session()   X-Ref

see: tpl_incdir()

init_paths()   X-Ref
Checks paths from config file

init_lang($langCode)   X-Ref
Load the language strings

param: string $langCode language code, as passed by event handler

init_files()   X-Ref
Checks the existence of certain files and creates them if missing.

init_path($path)   X-Ref
Returns absolute path

This tries the given path first, then checks in DOKU_INC.
Check for accessibility on directories as well.

return: bool|string
param: string $path
author: Andreas Gohr <andi@splitbrain.org>

init_creationmodes()   X-Ref
Sets the internal config values fperm and dperm which, when set,
will be used to change the permission of a newly created dir or
file with chmod. Considers the influence of the system's umask
setting the values only if needed.

getBaseURL($abs = null)   X-Ref
Returns the full absolute URL to the directory where
DokuWiki is installed in (includes a trailing slash)

!! Can not access $_SERVER values through $INPUT
!! here as this function is called before $INPUT is
!! initialized.

return: string
param: null|bool $abs Return an absolute URL? (null defaults to $conf['canonical'])
author: Andreas Gohr <andi@splitbrain.org>

is_ssl()   X-Ref
Check if accessed via HTTPS

Apache leaves ,$_SERVER['HTTPS'] empty when not available, IIS sets it to 'off'.
'false' and 'disabled' are just guessing

returns: bool true when SSL is active

isWindows()   X-Ref
checks it is windows OS

return: bool

nice_die($msg)   X-Ref
print a nice message even if no styles are loaded yet.

param: integer|string $msg

fullpath($path, $exists = false)   X-Ref
A realpath() replacement

This function behaves similar to PHP's realpath() but does not resolve
symlinks or accesses upper directories

return: bool|string
param: string $path
param: bool $exists
author: Andreas Gohr <andi@splitbrain.org>
author: <richpageau at yahoo dot co dot uk>
link: http://php.net/manual/en/function.realpath.php#75992