2
0
forked from Wavyzz/dolibarr

Fix: missing a return into clean_url function

This commit is contained in:
Laurent Destailleur
2012-06-15 11:24:09 +02:00
parent 2e74a4ba85
commit eb543f0606
2 changed files with 16 additions and 0 deletions

View File

@@ -378,6 +378,7 @@ function clean_url($url,$http=1)
return $CleanUrl; return $CleanUrl;
} }
else return $url;
} }
/** /**

View File

@@ -451,6 +451,21 @@ if (empty($reshook))
} }
} }
} }
// Remove file in doc form
else if ($action == 'remove_file')
{
if ($object->fetch($socid))
{
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
$langs->load("other");
$upload_dir = $conf->societe->dir_output;
$file = $upload_dir . '/' . GETPOST('file');
dol_delete_file($file,0,0,0,$object);
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('file')).'</div>';
}
}
} }