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.
new function course_setup() thats does proper $CFG-> , locale and themes setup much sooner than print_header() originally (needed for MDL-8067), cleanup of forgotten global $course issues
MDL-8067 Fixed several $HTTPSREQUIRED issues - html editor now loads from https (the old hack did not wotk with IE7, new hack is uglier but works), fixed formlibs images (we can not set them in library global scope, we must wait for httpsrequired() and require_login() and od that in function), fixed links in meta.php, fixed help images
fixed setting of new $USER values in user edit forms
record cache and caching schemes get a little cleanup, faster
if()s and a nice set of config options. Users who've been using
the internal cache get a nice upgrade too.
$MCACHE is initially based on core API that is shared between memcached and
turckmmcache/eaccelerator. The core operations are add(), set() and delete()
This initial implementation uses the PECL-based PHP client. Would be trivial
to add support for a PHP-based client.
The $MCACHE facility can be used for DB cache, text filters cache, and possibly
for sessions.
On 64-bit platforms the in-memory footprint of our libraries is quite a bit
larger than usual, and we hit the 8MB default memory limit before we call
raise_memory_limit(). This patch moves raise_memory_limit() and
get_realsize() to setuplib so we can call them earlier, and moves the
call to _before_ we include the libraries.
On AMD64, for MOODLE_17_STABLE the footprint is about 9.5MB. Diet time? :-)