Commit 83b0bb37 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Fix bug when submitting block config form with owner tabs

parent a9e70875
......@@ -71,7 +71,7 @@ class PluginBlocktypeHtml extends PluginBlocktype {
);
}
public static function instance_config_save($values) {
public static function instance_config_save(&$values) {
if (isset($values['filebrowser']['selected'])) {
$values['artefactid'] = $values['filebrowser']['selected'][0];
}
......
......@@ -232,18 +232,18 @@ function pieform_element_filebrowser_configure_tabs($viewowner) {
$upload = null;
$selectedsubtab = null;
if ($viewowner['type'] == 'institution') {
$selectedtab = param_alpha('owner', 'institution');
$selectedtab = param_variable('owner', 'institution');
$upload = $selectedtab == 'institution';
$tabs['institution'] = get_string('institutionfiles', 'admin');
}
else if ($viewowner['type'] == 'group') {
$selectedtab = param_alpha('owner', 'group');
$selectedtab = param_variable('owner', 'group');
$upload = $selectedtab == 'group';
$tabs['group'] = get_string('groupfiles', 'artefact.file');
}
else { // $viewowner['type'] == 'user'
global $USER;
$selectedtab = param_alpha('owner', 'user');
$selectedtab = param_variable('owner', 'user');
$upload = $selectedtab == 'user';
$tabs['user'] = get_string('myfiles', 'artefact.file');
if ($groups = $USER->get('grouproles')) {
......
......@@ -393,7 +393,7 @@ class BlockInstance {
);
$redirect = '/view/blocks.php?id=' . $this->get('view');
if (param_boolean('new')) {
if (param_boolean('new', false)) {
$redirect .= '&new=1';
}
if ($category = param_alpha('c', '')) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment