Merge branch 'MDL-38474-master' of git://github.com/FMCorz/moodle
authorDamyon Wiese <damyon@moodle.com>
Fri, 15 Mar 2013 05:49:57 +0000 (13:49 +0800)
committerDamyon Wiese <damyon@moodle.com>
Fri, 15 Mar 2013 05:49:57 +0000 (13:49 +0800)
repository/manage_instances.php

index cda4b3c..778c8a7 100644 (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);