merged from MOODLE_19_STABLE: fixing lying phpdoc comments in role_cap_duplicate function that I moved to accesslib yesterday

This commit is contained in:
mjollnir_
2007-12-19 23:32:53 +00:00
parent ad0178d890
commit 7bb03e8a7b
+9 -4
View File
@@ -2277,12 +2277,17 @@ function get_system_context($cache=true) {
if (!$context->id = insert_record('context', $context)) {
// better something than nothing - let's hope it will work somehow
if (!defined('SYSCONTEXTID')) {
// DONT do it if we're cli because it's IMMUNTABLE. Doing it during web installer works because
// each step is a new request
if (!defined('SYSCONTEXTID') && !defined('CLI_UPGRADE')) {
define('SYSCONTEXTID', 1);
$context->id = SYSCONTEXTID;
$context->path = '/'.SYSCONTEXTID;
} else {
$context->id = 0;
$context->path = '/0';
}
debugging('Can not create system context');
$context->id = SYSCONTEXTID;
$context->path = '/'.SYSCONTEXTID;
return $context;
}
}
@@ -5030,7 +5035,7 @@ function switch_roles($first, $second) {
/**
* duplicates all the base definitions of a role
*
* @param int $sourcerole id of role to copy from
* @param object $sourcerole role to copy from
* @param int $targetrole id of role to copy to
*
* @return void