]> git.mjollnir.org Git - moodle.git/commit
accesslib: build_context_path() is now much much cheaper
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:29:07 +0000 (07:29 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:29:07 +0000 (07:29 +0000)
commitad4c7473a9135392cd9c4cfab983758c6c124b67
treeac9612e37f327c1d059966a68c0eb474158e71eb
parent2960a5525a9d4e4c53ad98aec0780e568a4cb3bc
accesslib: build_context_path() is now much much cheaper

We now populate the context.path only where it's empty,
this means that we take 0.15s instead of 0.6s. More importantly,
we avoid thrashing the DB's indexes pointlessly.

We also support Oracle and its dirty hack here.

And the function now has a $force parameter that can be used to
actually overwrite the paths/depths in case they've been corrupted.
lib/accesslib.php