mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-02 15:12:29 +01:00
Fix: delete of documents is done by page of element, not by the view
wrapper. Conflicts: htdocs/langs/en_US/main.lang htdocs/langs/fr_FR/main.lang htdocs/projet/fiche.php
This commit is contained in:
committed by
Regis Houssin
parent
caadf396e2
commit
514babeab1
@@ -31,6 +31,7 @@ require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/comm/action/class/cactioncomm.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/comm/action/class/actioncomm.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php");
|
||||
|
||||
@@ -67,8 +68,6 @@ if (! $sortfield) $sortfield="name";
|
||||
*/
|
||||
if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||
|
||||
// Creation repertoire si n'existe pas
|
||||
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid);
|
||||
|
||||
@@ -77,7 +76,16 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']);
|
||||
if (is_numeric($resupload) && $resupload > 0)
|
||||
{
|
||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||
if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
|
||||
{
|
||||
// Create small thumbs for image (Ratio is near 16/9)
|
||||
// Used on logon for example
|
||||
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
|
||||
// Create mini thumbs for image (Ratio is near 16/9)
|
||||
// Used on menu or for setup page for example
|
||||
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
|
||||
}
|
||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user