Almost no cost - most of our require/include calls are with
absolute paths, which will skip the include_path. The few
that are not absolute are usually to include PEAR libs -
so this is appropriate and avoids having to change the
PEAR libs themselves when they make references to other
PEAR libs.
Using the include path does mean that OS-installed PEAR libs
will override ours. There's a small compat risk here - if you
need to ensure a particular version, use an absolute path.
These two constants indicate that the Moodle core should not mangle
input (magic quotes of any kind verboten!) and should not spit odd stuff
in the output (displaydebug verboten!). Both are needed for WebDAV
support.
MOODLE_SANE_INPUT is tricky - it means that the codepaths _must_ use
$db->qstr() (or addslashes() - but that has its own problems).
$CFG->rcache is safe to keep, even as we are reading the config table.
This is because whenever we update the config table, all the rcache
plugins either mark the cache as dirty or they update the cache.
The reason we want to be able to preserve this is that rcache settings
in CFG should usually be set in config.php rather than in the config
table.
With this fix, we support both control points.
MDL-11527 fixed warning from $CFG->defaultuserroleid when installing and upgrading
+ removed reusing of previous contexts in has_capability() and get_context_instance() because it was hiding critical errors when context was false, not specified, etc.
+ tweaked roles defaults - faster and defaults are applied when roles exist
+ SYSCONTEXTID may be specified in config.php to eliminate 1 db query
+ static context cache is now reset after rebuilding of context paths
+ path field in context table is now nullable - pg compatibility requirement
+ other minor fixes
By moving the performance profile logging to the very
end of PHP processing, we cover more pages, notably those
that don't end up with a footer or a redirect, like file
serving.
This should improve quality of our performance logs, and
help catch some piggies...
Now Moodle will have a 'shutdown_function' function. Right now
registered (and useful) only when running under apache + mod_php.
This initial function checks whether memory usage in this process exceeded
10MiB or $CFG->apachemaxmem (int, in bytes). This is really useful to prevent
using more RAM than we have.