]> git.mjollnir.org Git - moodle.git/commit
accesslib: Introduce functions to deal with dirty contexts
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:10:09 +0000 (07:10 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:10:09 +0000 (07:10 +0000)
commit0d25cd3a813765278c369f71a224888b4b82f1db
treee0cd4b79bddc371d7aac34c82ae6b94c0bbd5cfd
parent690c946c150d8c73f84e2ade4681e4d4d535d9a3
accesslib: Introduce functions to deal with dirty contexts

The accessinfo held in $USER->access can easily get out of
sync with reality if and admin has removed our access,
or expanded it after we loaded our accessinfo.

To handle this, we'll use the config_plugins table with an
'accesslib/dirtycontexts' plugin signature to store the paths of
recently changed contexts. To handle those dirrrty entries, here
we introduce

  get_dirty_contexts() - for lib/setup
  mark_context_dirty()
  cleanup_dirty_contexts() - for cron
lib/accesslib.php