Skip to content
Snippets Groups Projects
Commit 1ffb964d authored by Andrelec1's avatar Andrelec1
Browse files

Change method

Replace by existing constant ..
parent 8b6d613c
Branches
Tags
No related merge requests found
...@@ -105,9 +105,9 @@ else if ($action == 'MAIN_ANTIVIRUS_PARAM') ...@@ -105,9 +105,9 @@ else if ($action == 'MAIN_ANTIVIRUS_PARAM')
if (! dolibarr_set_const($db, "MAIN_ANTIVIRUS_PARAM", $_POST["MAIN_ANTIVIRUS_PARAM"],'chaine',0,'',$conf->entity)) dol_print_error($db); if (! dolibarr_set_const($db, "MAIN_ANTIVIRUS_PARAM", $_POST["MAIN_ANTIVIRUS_PARAM"],'chaine',0,'',$conf->entity)) dol_print_error($db);
else setEventMessage($langs->trans("RecordModifiedSuccessfully")); else setEventMessage($langs->trans("RecordModifiedSuccessfully"));
} }
else if ($action == 'MAIN_SECURITY_HIDDENNUMVER') else if ($action == 'MAIN_APPLICATION_TITLE')
{ {
if (! dolibarr_set_const($db, "MAIN_SECURITY_HIDDENNUMVER", $_POST["MAIN_SECURITY_HIDDENNUMVER"],'chaine',0,'',$conf->entity)) dol_print_error($db); if (! dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", $_POST["MAIN_SESSION_TIMEOUT"],'chaine',0,'',$conf->entity)) dol_print_error($db);
else setEventMessage($langs->trans("RecordModifiedSuccessfully")); else setEventMessage($langs->trans("RecordModifiedSuccessfully"));
} }
...@@ -170,8 +170,24 @@ print '<input type="submit" class="button" name="button" value="'.$langs->trans( ...@@ -170,8 +170,24 @@ print '<input type="submit" class="button" name="button" value="'.$langs->trans(
print '</td>'; print '</td>';
print '</tr></form>'; print '</tr></form>';
print '</table>'; $var=!$var;
$sessiontimeout=ini_get("session.gc_maxlifetime");
if (empty($conf->global->MAIN_APPLICATION_TITLE)) $conf->global->MAIN_APPLICATION_TITLE="";
print '<form action="'.$_SERVER["PHP_SELF"].'?action=MAIN_APPLICATION_TITLE" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans("HiddeNumVersion").'</td><td align="right">';
print $form->textwithpicto('',$langs->trans("HiddeNumVersionExample",ini_get("session.gc_probability"),ini_get("session.gc_divisor")));
print '</td>';
print '<td class="nowrap">';
print '<input class="flat" name="MAIN_SESSION_TIMEOUT" type="text" size="20" value="'.htmlentities($conf->global->MAIN_APPLICATION_TITLE).'"> ';
print '</td>';
print '<td align="right">';
print '<input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'">';
print '</td>';
print '</tr></form>';
print '</table>';
print '<br>'; print '<br>';
...@@ -184,28 +200,6 @@ print '<td colspan="3">'.$langs->trans("Parameters").'</td>'; ...@@ -184,28 +200,6 @@ print '<td colspan="3">'.$langs->trans("Parameters").'</td>';
print '<td align="right" width="100">'.$langs->trans("Status").'</td>'; print '<td align="right" width="100">'.$langs->trans("Status").'</td>';
print '</tr>'; print '</tr>';
// Hidde version number
$var=!$var;
print "<tr ".$bc[$var].">";
print '<td colspan="3">'.$langs->trans("HiddeNumVersion").'</td>'; // TODO add lag
print '<td align="right">';
if (! empty($conf->use_javascript_ajax))
{
print ajax_constantonoff('MAIN_SECURITY_HIDDENNUMVER');
}
else
{
if (empty($conf->global->MAIN_SECURITY_HIDDENNUMVER))
{
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_MAIN_SECURITY_HIDDENNUMVER">'.img_picto($langs->trans("Disabled"),'off').'</a>';
}
else
{
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_MAIN_SECURITY_HIDDENNUMVER">'.img_picto($langs->trans("Enabled"),'on').'</a>';
}
}
print '</td></tr>';
// Enable Captcha code // Enable Captcha code
$var=!$var; $var=!$var;
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
...@@ -362,6 +356,5 @@ $formfile->form_attach_new_file($_SERVER['PHP_SELF'], $langs->trans("FormToTestF ...@@ -362,6 +356,5 @@ $formfile->form_attach_new_file($_SERVER['PHP_SELF'], $langs->trans("FormToTestF
$filearray=dol_dir_list($upload_dir, "files", 0, '', '', 'name', SORT_ASC, 1); $filearray=dol_dir_list($upload_dir, "files", 0, '', '', 'name', SORT_ASC, 1);
$formfile->list_of_documents($filearray, '', 'admin_temp', ''); $formfile->list_of_documents($filearray, '', 'admin_temp', '');
llxFooter(); llxFooter();
$db->close(); $db->close();
...@@ -27,7 +27,6 @@ if (GETPOST('dol_use_jmobile')) $conf->dol_use_jmobile=1; ...@@ -27,7 +27,6 @@ if (GETPOST('dol_use_jmobile')) $conf->dol_use_jmobile=1;
$arrayofjs=array('/core/js/dst.js'.(empty($conf->dol_use_jmobile)?'':'?version='.urlencode(DOL_VERSION))); // Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second $arrayofjs=array('/core/js/dst.js'.(empty($conf->dol_use_jmobile)?'':'?version='.urlencode(DOL_VERSION))); // Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second
$titleofloginpage=$langs->trans('Login').' '.$title; // title is defined by dol_loginfunction in security2.lib.php $titleofloginpage=$langs->trans('Login').' '.$title; // title is defined by dol_loginfunction in security2.lib.php
$titleAff = !empty($conf->$global->MAIN_SECURITY_HIDDENNUMVER) ? dol_escape_htmltag($title) : "Dolibarr" ;
print top_htmlhead('',$titleofloginpage,0,0,$arrayofjs); print top_htmlhead('',$titleofloginpage,0,0,$arrayofjs);
?> ?>
...@@ -63,8 +62,8 @@ $(document).ready(function () { ...@@ -63,8 +62,8 @@ $(document).ready(function () {
<input type="hidden" name="dol_no_mouse_hover" id="dol_no_mouse_hover" value="<?php echo $dol_no_mouse_hover; ?>" /> <input type="hidden" name="dol_no_mouse_hover" id="dol_no_mouse_hover" value="<?php echo $dol_no_mouse_hover; ?>" />
<input type="hidden" name="dol_use_jmobile" id="dol_use_jmobile" value="<?php echo $dol_use_jmobile; ?>" /> <input type="hidden" name="dol_use_jmobile" id="dol_use_jmobile" value="<?php echo $dol_use_jmobile; ?>" />
<table class="login_table_title center" summary="<?php echo $titleAff; ?>"> <table class="login_table_title center" summary="<?php echo dol_escape_htmltag($title); ?>">
<tr class="vmenu"><td align="center"><?php echo $titleAff; ?></td></tr> <tr class="vmenu"><td align="center"><?php echo dol_escape_htmltag($title); ?></td></tr>
</table> </table>
<br> <br>
......
...@@ -81,7 +81,8 @@ MustBeLowerThanPHPLimit=Remarque : Votre PHP limite la taille des envois à <b> ...@@ -81,7 +81,8 @@ MustBeLowerThanPHPLimit=Remarque : Votre PHP limite la taille des envois à <b>
NoMaxSizeByPHPLimit=Aucune limite configurée dans votre serveur PHP NoMaxSizeByPHPLimit=Aucune limite configurée dans votre serveur PHP
MaxSizeForUploadedFiles=Taille maximum des fichiers envoyés (0 pour interdire l'envoi) MaxSizeForUploadedFiles=Taille maximum des fichiers envoyés (0 pour interdire l'envoi)
UseCaptchaCode=Utilisation du code graphique (CAPTCHA) sur la page de connexion UseCaptchaCode=Utilisation du code graphique (CAPTCHA) sur la page de connexion
HiddeNumVersion=Cacher le numero de version sur la page de login HiddeNumVersion=Modifier titre du site
HiddeNumVersionExample=Remplace titre du site, si laisser vide cela affiche la valeur par defaut ( Dolibarr X.X.X )
UseAvToScanUploadedFiles=Utiliser un antivirus pour vérifier les fichiers envoyés UseAvToScanUploadedFiles=Utiliser un antivirus pour vérifier les fichiers envoyés
AntiVirusCommand= Chemin complet vers la commande antivirus AntiVirusCommand= Chemin complet vers la commande antivirus
AntiVirusCommandExample= Exemple pour ClamWin : c:\\Progra~1\\ClamWin\\bin\\clamscan.exe<br>Exemple pour ClamAv : /usr/bin/clamscan AntiVirusCommandExample= Exemple pour ClamWin : c:\\Progra~1\\ClamWin\\bin\\clamscan.exe<br>Exemple pour ClamAv : /usr/bin/clamscan
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment