[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/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
 inc/config_cascade.php
 inc/load.php
 inc/lang/en/lang.php

Defines 12 functions

  delta_time()
  init_session()
  init_paths()
  init_lang()
  init_files()
  init_path()
  init_creationmodes()
  getBaseURL()
  is_ssl()
  isWindows()
  nice_die()
  fullpath()

Functions
Functions that are not part of a class:

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

param: integer $start
return: mixed

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.

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

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.

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

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

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