New: Add a confirmation on dangerous admin purge feature.

This commit is contained in:
Laurent Destailleur 2009-07-04 12:50:43 +00:00
parent 0240ad799a
commit 686c717161
2 changed files with 3 additions and 3 deletions

View File

@ -22,6 +22,7 @@ For users:
- New: Added a link from product list to their stock movements. - New: Added a link from product list to their stock movements.
- New: Several speed enhancements after using the Google Page speed - New: Several speed enhancements after using the Google Page speed
plugin for FireBug. plugin for FireBug.
- New: Add a confirmation on dangerous admin purge feature.
- Fix: Fix payment conditions on commercial proposals. - Fix: Fix payment conditions on commercial proposals.
- Fix: Nb of orders to process was wrong. - Fix: Nb of orders to process was wrong.
- Fix: Customer code was not correct on PDF it if contains special - Fix: Customer code was not correct on PDF it if contains special

View File

@ -42,11 +42,10 @@ if ($conf->syslog->enabled)
} }
/* /*
* Actions * 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(); $filesarray=array();
@ -169,7 +168,7 @@ if (eregi('^confirm',$_REQUEST["choice"]))
{ {
print '<br>'; print '<br>';
$formquestion=array(); $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 '<br>'; if ($ret == 'html') print '<br>';
} }