Skip to content

Commit

Permalink
Merge branch 'w29_MDL-28392_m22_capnames' of git://github.com/skodak/…
Browse files Browse the repository at this point in the history
…moodle
  • Loading branch information
Sam Hemelryk committed Jul 25, 2011
2 parents 8306a37 + b7d7aaf commit 94ffa4a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/accesslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -3395,6 +3395,12 @@ function update_capabilities($component = 'moodle') {
$storedcaps = array();

$filecaps = load_capability_def($component);
foreach($filecaps as $capname=>$unused) {
if (!preg_match('|^[a-z]+/[a-z_0-9]+:[a-z_0-9]+$|', $capname)) {
debugging("Coding problem: Invalid capability name '$capname', use 'clonepermissionsfrom' field for migration.");
}
}

$cachedcaps = get_cached_capabilities($component);
if ($cachedcaps) {
foreach ($cachedcaps as $cachedcap) {
Expand Down

0 comments on commit 94ffa4a

Please sign in to comment.