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 [2013-08-07 16:08] – [DOKU_<*>] Klap-indevel:environment [2023-11-05 14:50] (current) Klap-in
Line 8: Line 8:
  
 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. :!:
 +
 +:!: 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 19: 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['auth'][<auth_name>][<setting_name>]'' --- Auth backend settings, refer to the auth backend documentation.+  * ''$conf['plugin'][<auth_plugin_name>][<setting_name>]'' --- Auth plugin settings, refer to the auth plugin documentation.
  
 Normally you don't need to access this array directly. Both, Plugins and Templates have their own methods to accessing their respective configuration settings. Normally you don't need to access this array directly. Both, Plugins and Templates have their own methods to accessing their respective configuration settings.
Line 72: 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 88: 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 94: 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 200: 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 212: 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>/
Line 225: Line 236:
   /var/www/dokuwiki/lib/plugins/   /var/www/dokuwiki/lib/plugins/
  
-  +===== Request Variables ===== 
 + 
 +Since 2012-09-10 “Adora Belle”, request variables are accessible through the [[xref>Input]] class. For further information please have a look at [[devel:request_vars]]. 
devel/environment.1375884515.txt.gz · Last modified: 2013-08-07 16:08 by Klap-in

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