(With many thanks to Jason Wickers (jwickers at scs.wsu.edu))
----
There are still a few minor things to iron out, but overall
it works fairly well at this point. Any plugin that calls
DisplayPageHeader() will now have to replace their </body></html>
with a simple call to noframes_bottom() to be compatible...
(Possibly rename that function to DisplayPageFooter in the future)
Added basic @package/@subpackage tags
The decode/ files were documented slightly more thoroughly, although they're almost self-explanatory anyway.
The individual functions in the functions/ files need to be documented though, and now that this commit is in, anyone willing to write docblocks for functions should get cracking ;)
about the $_SESSION/$HTTP_SESSION_VAR not being available until a session
was explicitly started. 99% of the time, this shouldn't be needed, but
this function checks for an active session, and starts one if there isn't
an active one. This should fix the following references for the $_ vars.
Tested, and doesn't seem to break anything
Correctly retrieve values from global vars in case where
4.1 superglobals are not defined..
(Problem caused by references made in global scope not existing within
function scope).
Don't know why I listened to whoever told me to add them.. <sighs>
thought it was acting funny whenever you tried to receive
variables outside of the default.
BLARGH.
it works now, so there.
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.
we split the streams to the new RC for 1.4.
check_sm_version performs similar function to check_php_version, and
will return true if version is >= what is specified.
For Thijs/Jonathan - the check_sm_version will return false if the
constant it checks against is not defined, making the function itself
safe for previous levels, should you want to roll it back to stable
to allow plugin developers to use the check_sm_version function to
test for 'new' elements like SM_PATH, etc. that are present in 1.3.x
and up.
More info (though not a ton, I'll admit) is in the sm2-planning module
in cvs: cvs co sm2-planning, then pull up sm2-planning/index.php in your
browser.