DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:environment

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
devel:environment [2015-09-17 21:10] – [$ACT] can sometimes be an array LarsDW223devel:environment [2023-11-05 14:50] (current) Klap-in
Line 9: Line 9:
 Holds the current action, see [[Action Modes]]. ([[xref>$ACT|reference]]) Holds the current action, see [[Action Modes]]. ([[xref>$ACT|reference]])
  
-:!: $ACT can also be an array instead of a string depending on when it is used. So if you compare it using a string comparison function (e.g. strcmp(), strncmp()) then you better make sure that it is not an array using !is_array($ACT). Otherwise the result may be undefined. :!:+:!: ''$ACT'' can also be an array instead of a string depending on when it is used. So if you compare it using a string comparison function (e.g. ''strcmp()''''strncmp()'') then you better make sure that it is not an array using ''!is_array($ACT)''. Otherwise the result may be undefined. :!: 
 + 
 +:!: If you are handling an [[devel:event:ACTION_ACT_PREPROCESS]] event, use ''%%$event->data%%'' instead of ''$ACT''.
  
 ==== $auth ==== ==== $auth ====
  
-The globally available ''$auth'' object represents an instance of the used [[:auth|authentication backend]]. ([[xref>$auth|reference]])+The globally available ''$auth'' object represents an instance of the used [[:auth|authentication plugin]], which inherites from [[xref>AuthPlugin]]. ([[xref>$auth|reference]])
  
 ==== $conf ==== ==== $conf ====
Line 21: Line 23:
   * ''$conf[<setting_name>]'' --- DokuWiki settings (refer [[:config]])   * ''$conf[<setting_name>]'' --- DokuWiki settings (refer [[:config]])
   * ''$conf[<setting_group>][<setting_name>]'' --- Some DokuWiki settings use this format, e.g. ftp, proxy and target settings.   * ''$conf[<setting_group>][<setting_name>]'' --- Some DokuWiki settings use this format, e.g. ftp, proxy and target settings.
-  * ''$conf['tpl'][<template_name>][<setting_name>]'' --- Template configuration settings, refer to the template documentation.+  * ''$conf['tpl'][<template_name>][<setting_name>]'' --- Template configuration settings, refer to the template documentation. Note only one template at a time is enabled.
   * ''$conf['plugin'][<plugin_name>][<setting_name>]'' --- Plugin configuration settings, refer to the plugin documentation.   * ''$conf['plugin'][<plugin_name>][<setting_name>]'' --- Plugin configuration settings, refer to the plugin documentation.
   * ''$conf['plugin'][<auth_plugin_name>][<setting_name>]'' --- Auth plugin settings, refer to the auth plugin documentation.   * ''$conf['plugin'][<auth_plugin_name>][<setting_name>]'' --- Auth plugin settings, refer to the auth plugin documentation.
Line 74: Line 76:
 ==== $REV ==== ==== $REV ====
  
-Holds the revision timestamp of the currently rendered page. This is ''false'' when the most current page is meant. ([[xref>$REV|reference]])+Holds the revision timestamp of the currently rendered page. This is ''%%''%%'' (empty string) when the most current page is meant. ([[xref>$REV|reference]])
  
 ==== $_SERVER['REMOTE_USER'] ==== ==== $_SERVER['REMOTE_USER'] ====
  
 This variable is explicitly set by DokuWiki's authentication mechanism when a user logs in and holds the users name. This variable is explicitly set by DokuWiki's authentication mechanism when a user logs in and holds the users name.
 +<code php>
 +$userid = $INPUT->server->str('REMOTE_USER');
 +</code>
  
 ==== $TEXT ==== ==== $TEXT ====
Line 90: Line 95:
 ==== $USERINFO ==== ==== $USERINFO ====
  
-An globally available associative array which hold some information of **authenticated** user.+An globally available associative array which hold some information of an **authenticated** user.
  
   * pass - hash of the users' password   * pass - hash of the users' password
Line 96: Line 101:
   * mail - the users' mail address   * mail - the users' mail address
   * grps - array of groups the user is part of   * grps - array of groups the user is part of
 +
 +If logged out, or not logged in, this global is set to null.
  
 ([[xref>$USERINFO|reference]] ) ([[xref>$USERINFO|reference]] )
 +
 +The array is filled in [[xref>auth_setCookie()]] after login, or from existing session [[xref>auth_login()]]. Or if the authentication plugin uses [[xref>trustExternal()]], it is already set there.
 ==== $JSINFO ==== ==== $JSINFO ====
  
Line 202: Line 211:
 === DOKU_TPL === === DOKU_TPL ===
  
-The URL base path to the current used template. ([[xref>DOKU_TPL|reference]])+([[deprecated]]) The URL base path to the current used template. ([[xref>DOKU_TPL|reference]])
  
   /dokuwiki/lib/tpl/<template>/   /dokuwiki/lib/tpl/<template>/
Line 214: Line 223:
 === DOKU_TPLINC === === DOKU_TPLINC ===
  
-The server side include path of the current used template. ([[xref>DOKU_TPLINC|reference]])+([[deprecated]]) The server side include path of the current used template. ([[xref>DOKU_TPLINC|reference]])
  
   /var/www/dokuwiki/lib/tpl/<template>/   /var/www/dokuwiki/lib/tpl/<template>/
devel/environment.1442517039.txt.gz · Last modified: 2015-09-17 21:10 by LarsDW223

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki