diff --git a/htdocs/api/admin/index.php b/htdocs/api/admin/index.php
index b9548c7f69e..d618c65836b 100644
--- a/htdocs/api/admin/index.php
+++ b/htdocs/api/admin/index.php
@@ -71,7 +71,7 @@ if ($action == 'setproductionmode') {
}
// Disable compression mode
-if ($action == 'setdisablecomprssion') {
+if ($action == 'setdisablecompression') {
$status = GETPOST('status', 'alpha');
if (dolibarr_set_const($db, 'API_DISABLE_COMPRESSION', $status, 'chaine', 0, '', 0) > 0) {
@@ -118,11 +118,11 @@ print '
';
print '| '.$langs->trans("ApiProductionMode").' | ';
$production_mode = (empty($conf->global->API_PRODUCTION_MODE) ?false:true);
if ($production_mode) {
- print '';
+ print ' | ';
print img_picto($langs->trans("Activated"), 'switch_on');
print ' | ';
} else {
- print '';
+ print ' | ';
print img_picto($langs->trans("Disabled"), 'switch_off');
print ' | ';
}
@@ -133,11 +133,11 @@ print '
';
print '| '.$langs->trans("API_DISABLE_COMPRESSION").' | ';
$disable_compression = (empty($conf->global->API_DISABLE_COMPRESSION) ?false:true);
if ($disable_compression) {
- print '';
+ print ' | ';
print img_picto($langs->trans("Activated"), 'switch_on');
print ' | ';
} else {
- print '';
+ print ' | ';
print img_picto($langs->trans("Disabled"), 'switch_off');
print ' | ';
}
diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php
index 6222d3db8bd..af48f0f8348 100644
--- a/htdocs/ftp/index.php
+++ b/htdocs/ftp/index.php
@@ -98,41 +98,6 @@ $mesg = '';
* ACTIONS
*/
-// Submit file
-if (GETPOST("sendit") && !empty($conf->global->MAIN_UPLOAD_DOC)) {
- require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
-
- $result = $ecmdir->fetch(GETPOST("section", 'int'));
- if (!($result > 0)) {
- dol_print_error($db, $ecmdir->error);
- exit;
- }
- $relativepath = $ecmdir->getRelativePath();
- $upload_dir = $conf->ecm->dir_output.'/'.$relativepath;
-
- if (dol_mkdir($upload_dir) >= 0) {
- $resupload = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir."/".dol_unescapefile($_FILES['userfile']['name']), 0);
- if (is_numeric($resupload) && $resupload > 0) {
- $result = $ecmdir->changeNbOfFiles('+');
- } else {
- $langs->load("errors");
- if ($resupload < 0) { // Unknown error
- setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors');
- } elseif (preg_match('/ErrorFileIsInfectedWithAVirus/', $resupload)) {
- // Files infected by a virus
- setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors');
- } else // Known error
- {
- setEventMessages($langs->trans($resupload), null, 'errors');
- }
- }
- } else {
- // Transfer failure (file exceeding the limit ?)
- $langs->load("errors");
- setEventMessages($langs->trans("ErrorFailToCreateDir", $upload_dir), null, 'errors');
- }
-}
-
if ($action == 'uploadfile') {
// set up a connection or die
if (!$conn_id) {
@@ -661,6 +626,7 @@ if (!function_exists('ftp_connect')) {
print '';
print "";
+
if ($user->hasRight('ftp', 'write')) {
print load_fiche_titre($langs->trans("AttachANewFile"), null, null);
print '';
+
+ print '
';
+
print load_fiche_titre($langs->trans("AddFolder"), null, null);
print '