mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 15:42:29 +01:00
Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/core/modules/expedition/doc/pdf_rouget.modules.php htdocs/filefunc.inc.php
This commit is contained in:
@@ -41,6 +41,7 @@ $langs->loadLangs(array("errors","admin","modulebuilder"));
|
||||
$mode=GETPOST('mode', 'alpha');
|
||||
if (empty($mode)) $mode='common';
|
||||
$action=GETPOST('action','alpha');
|
||||
//var_dump($_POST);exit;
|
||||
$value=GETPOST('value', 'alpha');
|
||||
$page_y=GETPOST('page_y','int');
|
||||
$search_keyword=GETPOST('search_keyword','alpha');
|
||||
@@ -1010,8 +1011,29 @@ if ($mode == 'deploy')
|
||||
print '<form enctype="multipart/form-data" method="POST" class="noborder" action="'.$_SERVER["PHP_SELF"].'" name="forminstall">';
|
||||
print '<input type="hidden" name="action" value="install">';
|
||||
print '<input type="hidden" name="mode" value="deploy">';
|
||||
print $langs->trans("YouCanSubmitFile").' <input type="file" name="fileinstall"> ';
|
||||
|
||||
print $langs->trans("YouCanSubmitFile");
|
||||
|
||||
$max=$conf->global->MAIN_UPLOAD_DOC; // En Kb
|
||||
$maxphp=@ini_get('upload_max_filesize'); // En inconnu
|
||||
if (preg_match('/k$/i',$maxphp)) $maxphp=$maxphp*1;
|
||||
if (preg_match('/m$/i',$maxphp)) $maxphp=$maxphp*1024;
|
||||
if (preg_match('/g$/i',$maxphp)) $maxphp=$maxphp*1024*1024;
|
||||
if (preg_match('/t$/i',$maxphp)) $maxphp=$maxphp*1024*1024*1024;
|
||||
// Now $max and $maxphp are in Kb
|
||||
$maxmin = $max;
|
||||
if ($maxphp > 0) $maxmin=min($max,$maxphp);
|
||||
|
||||
if ($maxmin > 0)
|
||||
{
|
||||
// MAX_FILE_SIZE doit précéder le champ input de type file
|
||||
print '<input type="hidden" name="max_file_size" value="'.($maxmin*1024).'">';
|
||||
}
|
||||
|
||||
print '<input class="flat minwidth400" type="file" name="fileinstall"> ';
|
||||
|
||||
print '<input type="submit" name="send" value="'.dol_escape_htmltag($langs->trans("Send")).'" class="button">';
|
||||
|
||||
print '</form>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
Reference in New Issue
Block a user