function generateConfig()
 {
     return rex_generatePlugins($this->configArray);
 }
function rex_uninstall_plugin($plugins, $pluginname)
{
    global $REX, $I18N_COM;
    $state = true;
    $install_dir = rex_plugins_dir() . '/' . $pluginname;
    $uninstall_file = $install_dir . '/uninstall.inc.php';
    $uninstall_sql = $install_dir . '/uninstall.sql';
    if (is_readable($uninstall_file)) {
        require $uninstall_file;
        // Wurde das "uninstall" Flag gesetzt, oder eine Fehlermeldung ausgegeben? Wenn ja, Abbruch
        $instmsg = OOPlugin::getProperty($pluginname, 'installmsg', '');
        if (OOPlugin::isInstalled($pluginname) || $instmsg) {
            $state = $I18N_COM->msg('plugin_no_uninstall', $pluginname) . '<br/>';
            if (empty($instmsg)) {
                $state .= $I18N_COM->msg('plugin_no_reason');
            } else {
                $state .= $instmsg;
            }
        } else {
            $state = rex_deactivate_plugin($plugins, $pluginname);
            if ($state === true && is_readable($uninstall_sql)) {
                $state = rex_install_dump($uninstall_sql);
                if ($state !== true) {
                    $state = 'Error found in uninstall.sql:<br />' . $state;
                }
            }
            if ($state === true) {
                // regenerate Addons file
                $state = rex_generatePlugins($plugins);
            }
        }
    } else {
        $state = $I18N_COM->msg("plugin_uninstall_not_found");
    }
    // Fehler beim uninstall -> Addon bleibt installiert
    if ($state !== true) {
        OOPlugin::setProperty($pluginname, 'install', 1);
    }
    return $state;
}