if (!defined('ALLOWED')) die('Appel direct ne sont pas permis'); if (!defined('ALLOWED_ADMIN')) { die(_('Non autorisé')); } require_once NOALYSS_INCLUDE.'/class/package_repository.class.php'; require_once NOALYSS_INCLUDE.'/class/extension.class.php'; /** * @file * @brief Install new plugin */ $package_repository=new Package_Repository(); $xml=$package_repository->getContent(); $a_plugin=$xml->xpath('//plugins/plugin'); $nb_plugin=count($a_plugin); echo _("Les extensions doivent être activées dans le dossier après installation"); ?>
Installé ou mettre à jour ???
name; ?> description; ?> author; ?> code; ?> version [version; ?>] root)."/plugin.xml")) { // plugin is installed take the version and compare with remote one $xml_plugin=$package_repository->read_package_xml(NOALYSS_PLUGIN."/".trim($a_plugin[$i]->root)."/plugin.xml"); if (count($xml_plugin->plugin)>1) { echo _("MultiModule"); } // Compute js to install or upgrade $js=sprintf("onclick=\"upgradePlugin('%s')\"", trim($a_plugin[$i]->code)); // Check if new version is available if (floatval(trim($xml_plugin->plugin->version))version))) { printf (_("Nouvelle version disponible %s , votre version %s"), floatval(trim($a_plugin[$i]->version)), trim($xml_plugin->plugin->version)); echo HtmlInput::button("upgrade", _("Mise à jour"), $js); } else { echo _("Dernière version installée"); } } else { // It is not installed , propose to install it $js=sprintf("onclick=\"upgradePlugin('%s')\"", trim($a_plugin[$i]->code)); echo _("Non installée"); echo HtmlInput::button("upgrade", _("Installation"), $js); } ?>