// ----------------------------------
// PLUGINS
// ----------------------------------

// List of active plugins (in plugins/ directory)
//Here we declare our activated plugins. If you want to add plugins, please do the following db command in a root terminal

//config setprop roundcube PluginsList "plugin1,plugin2,plugin3"
//Then issue
//signal-event conf-roundcube or signal-event roundcube-update

//The default list is : globaladdressbook,calendar,libcalendaring,contextmenu,markasjunk,vcard_attachments,newmail_notifier,emoticons,managesieve

{	use esmith::ConfigDB;
        my $DB = esmith::ConfigDB->open_ro;
        my $plugins = $DB->get_prop('roundcube','PluginsList') || "";
	my @plugs = split(',',$plugins);
        my @plugd ;
        for my $p (@plugs) {
            push @plugd, $p if -d "/usr/share/roundcubemail/plugins/$p";
        }
        @plugs=@plugd;
	s/^(.*)$/"\1"/ for @plugs;
	$plugins = join(',',@plugs);
        $OUT .= "\$config['plugins'] = array($plugins);";
}

