Commit a12d1063 authored by Nigel McNie's avatar Nigel McNie
Browse files

Make sure configdata is always an array, and unset fields we don't want.



This was bloating the configdata field in the block_instance table a
little with information we didn't care about. Said information was then
being exported, even though it isn't necessary.
Signed-off-by: default avatarNigel McNie <nigel@catalyst.net.nz>
parent fdf67a06
......@@ -327,7 +327,7 @@ class BlockInstance {
private $blocktype;
private $artefactplugin;
private $title;
private $configdata;
private $configdata = array();
private $dirty;
private $view;
private $view_obj;
......@@ -412,6 +412,10 @@ class BlockInstance {
unset($values['sesskey']);
unset($values['blockinstance']);
unset($values['action_configureblockinstance_id_' . $this->get('id')]);
unset($values['blockconfig']);
unset($values['id']);
unset($values['change']);
unset($values['new']);
if (is_callable(array(generate_class_name('blocktype', $this->get('blocktype')), 'instance_config_save'))) {
$values = call_static_method(generate_class_name('blocktype', $this->get('blocktype')), 'instance_config_save', $values);
......
Supports Markdown
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