MDL-29218 Repository: Hide the repo if repository::plugin_init returns false

This commit is contained in:
Matteo Scaramuccia
2013-09-02 23:09:20 +02:00
parent ee788142f2
commit 9b64ec4dae
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -143,8 +143,10 @@ if (($action == 'edit') || ($action == 'new')) {
$success = $repositorytype->update_options($settings);
} else {
$type = new repository_type($plugin, (array)$fromform, $visible);
$type->create();
$success = true;
if (!$repoid = $type->create()) {
$success = false;
}
$data = data_submitted();
}
if ($success) {