diff --git a/ChangeLog b/ChangeLog
index 5f5397c20c3..db0ee50a2ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,7 @@ For users:
- New: Added a link from product list to their stock movements.
- New: Several speed enhancements after using the Google Page speed
plugin for FireBug.
+- New: Add a confirmation on dangerous admin purge feature.
- Fix: Fix payment conditions on commercial proposals.
- Fix: Nb of orders to process was wrong.
- Fix: Customer code was not correct on PDF it if contains special
diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php
index bda4d91d4f8..81310100046 100644
--- a/htdocs/admin/tools/purge.php
+++ b/htdocs/admin/tools/purge.php
@@ -42,11 +42,10 @@ if ($conf->syslog->enabled)
}
-
/*
* Actions
*/
-if ($_POST["action"]=='purge' && ! eregi('^confirm',$_REQUEST["choice"]) && ($_REQUEST["choice"] != 'allfiles' || $_POST["confirm"] == 'yes') )
+if ($_REQUEST["action"]=='purge' && ! eregi('^confirm',$_REQUEST["choice"]) && ($_REQUEST["choice"] != 'allfiles' || $_REQUEST["confirm"] == 'yes') )
{
$filesarray=array();
@@ -169,7 +168,7 @@ if (eregi('^confirm',$_REQUEST["choice"]))
{
print '
';
$formquestion=array();
- $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?choice=allfiles',$langs->trans('Purge'),$langs->trans('ConfirmPurge'),'purge',$formquestion,'no',1);
+ $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?choice=allfiles',$langs->trans('Purge'),$langs->trans('ConfirmPurge'),'purge',$formquestion,'no',2);
if ($ret == 'html') print '
';
}