forked from Wavyzz/dolibarr
Merge remote-tracking branch 'upstream/develop' into nospaceaftercomma
This commit is contained in:
@@ -142,6 +142,12 @@ if ($action=='install')
|
||||
setEventMessages($langs->trans("ErrorFilenameDosNotMatchDolibarrPackageRules", $original_file, 'module_*-x.y*.zip'), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if (empty($_FILES['fileinstall']['tmp_name']))
|
||||
{
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
@@ -152,7 +158,7 @@ if ($action=='install')
|
||||
dol_mkdir($conf->admin->dir_temp.'/'.$original_file);
|
||||
}
|
||||
|
||||
$tmpdir=preg_replace('/\.zip$/', '', $original_file).'.dir';
|
||||
$tmpdir=preg_replace('/\.zip$/i', '', $original_file).'.dir';
|
||||
if ($tmpdir)
|
||||
{
|
||||
@dol_delete_dir_recursive($conf->admin->dir_temp.'/'.$tmpdir);
|
||||
@@ -207,6 +213,7 @@ if ($action=='install')
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($langs->trans("ErrorFailToRenameFile", $_FILES['fileinstall']['tmp_name'], $newfile), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
@@ -244,7 +251,7 @@ if ($action == 'set' && $user->admin)
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?mode=".$mode.$param.($page_y?'&page_y='.$page_y:''));
|
||||
exit;
|
||||
}
|
||||
else if ($action == 'reset' && $user->admin && GETPOST('confirm') == 'yes')
|
||||
elseif ($action == 'reset' && $user->admin && GETPOST('confirm') == 'yes')
|
||||
{
|
||||
$result=unActivateModule($value);
|
||||
if ($result) setEventMessages($result, null, 'errors');
|
||||
@@ -698,7 +705,7 @@ if ($mode == 'common')
|
||||
{
|
||||
print $langs->trans("Disabled");
|
||||
}
|
||||
else if (! empty($objMod->always_enabled) || ((! empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity!=1)))
|
||||
elseif (! empty($objMod->always_enabled) || ((! empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity!=1)))
|
||||
{
|
||||
if (method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) print $langs->trans("Used");
|
||||
else {
|
||||
@@ -761,7 +768,7 @@ if ($mode == 'common')
|
||||
}
|
||||
print "</td>\n";
|
||||
}
|
||||
else if (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url, $regs))
|
||||
elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url,$regs))
|
||||
{
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="60px"><a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a></td>';
|
||||
}
|
||||
@@ -783,7 +790,7 @@ if ($mode == 'common')
|
||||
{
|
||||
// Should never happened
|
||||
}
|
||||
else if (! empty($objMod->disabled))
|
||||
elseif (! empty($objMod->disabled))
|
||||
{
|
||||
print $langs->trans("Disabled");
|
||||
}
|
||||
@@ -1012,6 +1019,7 @@ if ($mode == 'deploy')
|
||||
print '<br>';
|
||||
|
||||
print '<form enctype="multipart/form-data" method="POST" class="noborder" action="'.$_SERVER["PHP_SELF"].'" name="forminstall">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="install">';
|
||||
print '<input type="hidden" name="mode" value="deploy">';
|
||||
|
||||
@@ -1047,6 +1055,20 @@ if ($mode == 'deploy')
|
||||
|
||||
print '<input type="submit" name="send" value="'.dol_escape_htmltag($langs->trans("Send")).'" class="button">';
|
||||
|
||||
if (! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
{
|
||||
if ($user->admin)
|
||||
{
|
||||
$langs->load('other');
|
||||
print ' ';
|
||||
print info_admin($langs->trans("ThisLimitIsDefinedInSetup",$max,$maxphp),1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print ' ('.$langs->trans("UploadDisabled").')';
|
||||
}
|
||||
|
||||
print '</form>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
Reference in New Issue
Block a user