mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
accesslib: Intro global $ACCESS and load_user_accessdata()
This patch introduces a new global $ACCESS that will cache accessdata (our ra/rdef array) for users that are _not_ the logged in user. Most of the time it will be empty (luckily). Each new user we have to get "in" costs us 3 or 4 cheap dbqueries at the moment, so it is not that bad. has_capability() now calls load_user_accessdata() if the call is for a non-logged-user. So $ACCESS is autopopulated transparently. This also means that has_capability no longer calls has_capability_old(). Yay! With this patch, user/view.php for looking at a user in a course... Before: 62 dbqueries, 10.3MB, 0.7s After: 49 dbqueries, 8.5MB, 0.3s
- Loading branch information
martinlanghoff
committed
Sep 19, 2007
1 parent
d7d4b0e
commit 204a369
Showing
1 changed file
with
47 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters