diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 38c7b5d23e6..80ba435d9a9 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -165,7 +165,7 @@ if (GETPOST('buttonreset', 'alpha')) { if ($action == 'install' && $allowonlineinstall) { $error = 0; - + $modulenameval = ''; // $original_file should match format module_modulename-x.y[.z].zip $original_file = basename($_FILES["fileinstall"]["name"]); $original_file = preg_replace('/\s*\(\d+\)\.zip$/i', '.zip', $original_file); @@ -282,8 +282,20 @@ if ($action == 'install' && $allowonlineinstall) { } if (!$error) { - $message = $langs->trans("SetupIsReadyForUse", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->transnoentitiesnoconv("Home").' - '.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Modules")); + $searchParams = array( + 'search_keyword' => $modulenameval, + 'search_status' => '-1', + 'search_nature' => '-1', + 'search_version' => '-1' + ); + $queryString = http_build_query($searchParams); + $redirectUrl = DOL_URL_ROOT . '/admin/modules.php?' . $queryString; + + $message = $langs->trans("SetupIsReadyForUse", $redirectUrl, $langs->transnoentitiesnoconv("Home").' - '.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Modules")); + setEventMessages($message, null, 'warnings'); + header('Location: ' . $redirectUrl); + exit; } } elseif ($action == 'install' && !$allowonlineinstall) { httponly_accessforbidden("You try to bypass the protection to disallow deployment of an external module. Hack attempt ?");