diff options
Diffstat (limited to 'program/include')
-rw-r--r-- | program/include/rcube_plugin.php | 8 | ||||
-rw-r--r-- | program/include/rcube_plugin_api.php | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/program/include/rcube_plugin.php b/program/include/rcube_plugin.php index e7115cbec..de0aabbe3 100644 --- a/program/include/rcube_plugin.php +++ b/program/include/rcube_plugin.php @@ -61,6 +61,14 @@ abstract class rcube_plugin */ public $noframe = false; + /** + * A list of config option names that can be modified + * by the user via user interface (with save-pref command) + * + * @var array + */ + public $allowed_prefs; + protected $home; protected $urlbase; private $mytask; diff --git a/program/include/rcube_plugin_api.php b/program/include/rcube_plugin_api.php index be12f11b5..61bab3ce9 100644 --- a/program/include/rcube_plugin_api.php +++ b/program/include/rcube_plugin_api.php @@ -35,6 +35,7 @@ class rcube_plugin_api public $url = 'plugins/'; public $output; public $config; + public $allowed_prefs = array(); public $handlers = array(); private $plugins = array(); @@ -188,6 +189,9 @@ class rcube_plugin_api $plugin->init(); $this->plugins[$plugin_name] = $plugin; } + if (!empty($plugin->allowed_prefs)) { + $this->allowed_prefs = array_merge($this->allowed_prefs, $plugin->allowed_prefs); + } return true; } } |