MDL-38474 repository: Cannot edit a repository instance

This commit is contained in:
Frederic Massart
2013-03-15 13:45:31 +08:00
parent e42861d4fa
commit 71ac66ed7f
+1 -1
View File
@@ -96,7 +96,7 @@ if ($context->contextlevel == CONTEXT_COURSE) {
}
/// Security: we cannot perform any action if the type is not visible or if the context has been disabled
if (!empty($new)){
if (!empty($new) && empty($edit)){
$type = repository::get_type_by_typename($new);
} else if (!empty($edit)){
$instance = repository::get_instance($edit);