diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index e5f6dae4852..854fd130bc5 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -29,18 +29,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; $langs->load("admin"); -$action=GETPOST('action', 'alpha'); +$action = GETPOST('action', 'alpha'); $sortfield = GETPOST('sortfield', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha'); $page = GETPOST('page', 'int'); -if (! $sortorder) $sortorder="DESC"; -if (! $sortfield) $sortfield="date"; +if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) $sortfield = "date"; if (empty($page) || $page == -1) { $page = 0; } -$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; +$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $offset = $limit * $page; -if (! $user->admin) +if (!$user->admin) accessforbidden(); @@ -52,33 +52,33 @@ if ($action == 'delete') { if (preg_match('/^backup\//', GETPOST('urlfile', 'alpha'))) { - $file=$conf->admin->dir_output.'/backup/'.basename(GETPOST('urlfile', 'alpha')); - $ret=dol_delete_file($file, 1); + $file = $conf->admin->dir_output.'/backup/'.basename(GETPOST('urlfile', 'alpha')); + $ret = dol_delete_file($file, 1); if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); } else { - $file=$conf->admin->dir_output.'/documents/'.basename(GETPOST('urlfile', 'alpha')); - $ret=dol_delete_file($file, 1); + $file = $conf->admin->dir_output.'/documents/'.basename(GETPOST('urlfile', 'alpha')); + $ret = dol_delete_file($file, 1); if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); } - $action=''; + $action = ''; } /* * View */ -$form=new Form($db); +$form = new Form($db); $formfile = new FormFile($db); -$label=$db::LABEL; -$type=$db->type; +$label = $db::LABEL; +$type = $db->type; //var_dump($db); -$help_url='EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad'; +$help_url = 'EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad'; llxHeader('', '', $help_url); print '