diff --git a/include/class.plugin.php b/include/class.plugin.php index f571ad75d5c135c1dfcc4258ab93394ac3af8d72..7e1a2b228bdcc9f7e4379c15ec4e8190d66859cf 100644 --- a/include/class.plugin.php +++ b/include/class.plugin.php @@ -9,8 +9,12 @@ class PluginConfig extends Config { // Use parent constructor to place configurable information into the // central config table in a namespace of "plugin.<id>" parent::Config("plugin.$name"); - foreach ($this->getOptions() as $name => $field) - $this->config[$name]['value'] = $field->to_php($this->get($name)); + foreach ($this->getOptions() as $name => $field) { + if ($this->exists($name)) + $this->config[$name]['value'] = $field->to_php($this->get($name)); + elseif ($default = $field->get('default')) + $this->defaults[$name] = $default; + } } /* abstract */