# # Contributors : # - Olivier Meunier # require dirname(__FILE__) . '/lib.php'; $err = ''; $tool_url = 'tools.php?p=packager'; # Liste des thèmes $themes_root = dirname(__FILE__) . '/../../../themes'; $themes = new plugins($themes_root, 'theme'); $themes->getPlugins(false); $themes_list = $themes->getPluginsList(); $plugins_root = dirname(__FILE__) . '/..'; $plugins = new plugins($plugins_root); $plugins->getPlugins(false); $plugins_list = $plugins->getPLuginsList(); # Préparation des tableaux pour les combo $t_list = $p_list = array(); foreach ($themes_list as $k => $v) { $t_list[$v['label'] . ' - ' . __('version') . ' ' . $v['version']] = $k; } foreach ($plugins_list as $k => $v) { $p_list[$v['label'] . ' - ' . __('version') . ' ' . $v['version']] = $k; } # Téléchargement ou sauvegarde d'un plugin if (!empty($_POST['p_plugin'])) { $fname = 'plugin-' . $_POST['p_plugin']; if (!empty($plugins_list[$_POST['p_plugin']]['version'])) { $fname .= '-' . $plugins_list[$_POST['p_plugin']]['version']; } $fname .= '.pkg.gz';