Added new function:
authorebullient <ebullient@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 4 Jan 2003 01:12:14 +0000 (01:12 +0000)
committerebullient <ebullient@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 4 Jan 2003 01:12:14 +0000 (01:12 +0000)
commit4cd8ae7de26f2915a4c98aa45fa528f543b4296a
treeac58f0590a2b91905a64d1b91e51e2a46867faed
parentf0b554f994b11c89139e3f13021b3b3c4cbcf45f
Added new function:

sqgetGlobalVar($name, $value [, location] );
This function looks for a variable named $name.
If found, it sets the value into $value (in signature, is &$value) and
returns true. If the variable is not found, the function returns false.

The optional constant allows you to pick which location to
check for the variable in. If none is specified, it will check,
in this order, $_SESSION, $_POST, $_GET. These are defined constants
for use with this function:
 SQ_INORDER - same as specifying nothing, check all three.
 SQ_SESSION
 SQ_POST
 SQ_GET

    It is recommended that plugins, all functions use this instead of
    directly accessing $_SESSION/$_POST/$_GET arrays, as we have
    already taken care of scope (global, etc).

    The Administration plugin has been updated to use this function,
    as an example.

    This is an alternative to sqextractGlobalVar($name), which looks
    for a var named $name in the SESSION/GET/POST arrays, and creates
    a global variable if defined.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4368 7612ce4b-ef26-0410-bec9-ea0150e637f0
functions/global.php
plugins/administrator/auth.php
plugins/administrator/options.php