[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/ -> infoutils.php (summary)

Information and debugging functions

Author: Andreas Gohr
License: GPL 2 (http://www.gnu.org/licenses/gpl.html)
File Size: 592 lines (19 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 11 functions

  checkUpdateMessages()
  getVersionData()
  getVersion()
  check()
  msg()
  info_msg_allowed()
  dbg()
  dbglog()
  dbg_deprecated()
  dbg_backtrace()
  debug_guard()

Functions
Functions that are not part of a class:

checkUpdateMessages()   X-Ref
Check for new messages from upstream

author: Andreas Gohr <andi@splitbrain.org>

getVersionData()   X-Ref
Return DokuWiki's version (split up in date and type)

author: Andreas Gohr <andi@splitbrain.org>

getVersion()   X-Ref
Return DokuWiki's version

This returns the version in the form "Type Date (SHA)". Where type is either
"Release" or "Git" and date is the date of the release or the date of the
last commit. SHA is the short SHA of the last commit - this is only added on
git checkouts.

If no version can be determined "snapshot? update version XX" is returned.
Where XX represents the update version number set in doku.php.

author: Anika Henke <anika@selfthinker.org>
return: string The version string e.g. "Release 2023-04-04a"

check()   X-Ref
Run a few sanity checks

author: Andreas Gohr <andi@splitbrain.org>

msg($message, $lvl = 0, $line = '', $file = '', $allow = MSG_PUBLIC)   X-Ref
Display a message to the user

If HTTP headers were not sent yet the message is added
to the global message array else it's printed directly
using html_msgarea()

Triggers INFOUTIL_MSG_SHOW

see: html_msgarea()
param: string $message
param: int $lvl -1 = error, 0 = info, 1 = success, 2 = notify
param: string $line line number
param: string $file file number
param: int $allow who's allowed to see the message, see MSG_* constants

info_msg_allowed($msg)   X-Ref
Determine whether the current user is allowed to view the message
in the $msg data structure

param: array $msg dokuwiki msg structure:
return: bool

dbg($msg, $hidden = false)   X-Ref
print debug messages

little function to print the content of a var

author: Andreas Gohr <andi@splitbrain.org>
param: string $msg
param: bool $hidden

dbglog($msg, $header = '')   X-Ref
Print info to debug log file

author: Andreas Gohr <andi@splitbrain.org>
param: string $msg
param: string $header

dbg_deprecated($alternative = '')   X-Ref
Log accesses to deprecated fucntions to the debug log

triggers: INFO_DEPRECATION_LOG
param: string $alternative The function or method that should be used instead

dbg_backtrace()   X-Ref
Print a reversed, prettyprinted backtrace

author: Gary Owen <gary_owen@bigfoot.com>

debug_guard(&$data)   X-Ref
Remove all data from an array where the key seems to point to sensitive data

This is used to remove passwords, mail addresses and similar data from the
debug output

author: Andreas Gohr <andi@splitbrain.org>
param: array $data