Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/core/class/html.formwebsite.class.php
	htdocs/core/lib/cron.lib.php
This commit is contained in:
Laurent Destailleur 2022-07-24 22:17:25 +02:00
commit ab81492fa4
62 changed files with 180 additions and 117 deletions

View File

@ -236,7 +236,7 @@ if ($some_mandatory_steps_of_setup_were_not_done) {
print ' : ' . $langs->trans("AccountancyAreaDescMisc", 4, '<strong>' . $langs->transnoentitiesnoconv("MenuAccountancy") . '-' . $langs->transnoentitiesnoconv("Setup") . "-" . $langs->transnoentitiesnoconv("MenuDefaultAccounts") . '</strong>'); print ' : ' . $langs->trans("AccountancyAreaDescMisc", 4, '<strong>' . $langs->transnoentitiesnoconv("MenuAccountancy") . '-' . $langs->transnoentitiesnoconv("Setup") . "-" . $langs->transnoentitiesnoconv("MenuDefaultAccounts") . '</strong>');
print '</div>'; print '</div>';
} }
print '<div class="tabsAction tabsActionNoBottom">'; print '<div class="tabsAction tabsActionNoBottom centerimp">';
if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL) && $in_bookkeeping == 'notyet') { if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL) && $in_bookkeeping == 'notyet') {
print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />'; print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
} }

View File

@ -178,14 +178,14 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td>'; print '<td>'.$langs->trans("Parameter").'</td>';
print '<td class="right">'.$langs->trans("Value").'</td>'; print '<td>'.$langs->trans("Value").'</td>';
print "</tr>\n"; print "</tr>\n";
// Force Type // Force Type
$adht = new AdherentType($db); $adht = new AdherentType($db);
print '<tr class="oddeven drag" id="trforcetype"><td>'; print '<tr class="oddeven drag" id="trforcetype"><td>';
print $langs->trans("ForceMemberType"); print $langs->trans("ForceMemberType");
print '</td><td class="right">'; print '</td><td>';
$listofval = array(); $listofval = array();
$listofval += $adht->liste_array(1); $listofval += $adht->liste_array(1);
$forcetype = empty($conf->global->MEMBER_NEWFORM_FORCETYPE) ? -1 : $conf->global->MEMBER_NEWFORM_FORCETYPE; $forcetype = empty($conf->global->MEMBER_NEWFORM_FORCETYPE) ? -1 : $conf->global->MEMBER_NEWFORM_FORCETYPE;
@ -197,7 +197,7 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
$morphys["mor"] = $langs->trans("Moral"); $morphys["mor"] = $langs->trans("Moral");
print '<tr class="oddeven drag" id="trforcenature"><td>'; print '<tr class="oddeven drag" id="trforcenature"><td>';
print $langs->trans("ForceMemberNature"); print $langs->trans("ForceMemberNature");
print '</td><td class="right">'; print '</td><td>';
$forcenature = empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY) ? 0 : $conf->global->MEMBER_NEWFORM_FORCEMORPHY; $forcenature = empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY) ? 0 : $conf->global->MEMBER_NEWFORM_FORCEMORPHY;
print $form->selectarray("MEMBER_NEWFORM_FORCEMORPHY", $morphys, $forcenature, 1); print $form->selectarray("MEMBER_NEWFORM_FORCEMORPHY", $morphys, $forcenature, 1);
print "</td></tr>\n"; print "</td></tr>\n";
@ -205,21 +205,21 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
// Amount // Amount
print '<tr class="oddeven" id="tramount"><td>'; print '<tr class="oddeven" id="tramount"><td>';
print $langs->trans("DefaultAmount"); print $langs->trans("DefaultAmount");
print '</td><td class="right">'; print '</td><td>';
print '<input type="text" class="right width75" id="MEMBER_NEWFORM_AMOUNT" name="MEMBER_NEWFORM_AMOUNT" value="'.(!empty($conf->global->MEMBER_NEWFORM_AMOUNT) ? $conf->global->MEMBER_NEWFORM_AMOUNT : '').'">'; print '<input type="text" class="right width50" id="MEMBER_NEWFORM_AMOUNT" name="MEMBER_NEWFORM_AMOUNT" value="'.(!empty($conf->global->MEMBER_NEWFORM_AMOUNT) ? $conf->global->MEMBER_NEWFORM_AMOUNT : '').'">';
print "</td></tr>\n"; print "</td></tr>\n";
// Can edit // Can edit
print '<tr class="oddeven" id="tredit"><td>'; print '<tr class="oddeven" id="tredit"><td>';
print $langs->trans("CanEditAmount"); print $langs->trans("CanEditAmount");
print '</td><td class="right">'; print '</td><td>';
print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT", (!empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT) ? $conf->global->MEMBER_NEWFORM_EDITAMOUNT : 0), 1); print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT", (!empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT) ? $conf->global->MEMBER_NEWFORM_EDITAMOUNT : 0), 1);
print "</td></tr>\n"; print "</td></tr>\n";
// Jump to an online payment page // Jump to an online payment page
print '<tr class="oddeven" id="trpayment"><td>'; print '<tr class="oddeven" id="trpayment"><td>';
print $langs->trans("MEMBER_NEWFORM_PAYONLINE"); print $langs->trans("MEMBER_NEWFORM_PAYONLINE");
print '</td><td class="right">'; print '</td><td>';
$listofval = array(); $listofval = array();
$listofval['-1'] = $langs->trans('No'); $listofval['-1'] = $langs->trans('No');
$listofval['all'] = $langs->trans('Yes').' ('.$langs->trans("VisitorCanChooseItsPaymentMode").')'; $listofval['all'] = $langs->trans('Yes').' ('.$langs->trans("VisitorCanChooseItsPaymentMode").')';

View File

@ -1227,12 +1227,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
print '<tr><td class="fieldrequired">'.$langs->trans("Password").'</td><td><input type="password" name="pass" class="minwidth300" maxlength="50" value="'.dol_escape_htmltag(GETPOSTISSET("pass") ? GETPOST("pass", 'none', 2) : $object->pass).'"></td></tr>'; print '<tr><td class="fieldrequired">'.$langs->trans("Password").'</td><td><input type="password" name="pass" class="minwidth300" maxlength="50" value="'.dol_escape_htmltag(GETPOSTISSET("pass") ? GETPOST("pass", 'none', 2) : $object->pass).'"></td></tr>';
} }
// Morphy
$morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Moral");
print '<tr><td><span class="fieldrequired">'.$langs->trans("MemberNature").'</span></td><td>';
print $form->selectarray("morphy", $morphys, (GETPOSTISSET("morphy") ? GETPOST("morphy", 'alpha') : $object->morphy), 0, 0, 0, '', 0, 0, 0, '', '', 1);
print "</td></tr>";
// Type // Type
print '<tr><td class="fieldrequired">'.$langs->trans("Type").'</td><td>'; print '<tr><td class="fieldrequired">'.$langs->trans("Type").'</td><td>';
@ -1244,6 +1238,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} }
print "</td></tr>"; print "</td></tr>";
// Morphy
$morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Moral");
print '<tr><td><span class="fieldrequired">'.$langs->trans("MemberNature").'</span></td><td>';
print $form->selectarray("morphy", $morphys, (GETPOSTISSET("morphy") ? GETPOST("morphy", 'alpha') : $object->morphy), 0, 0, 0, '', 0, 0, 0, '', '', 1);
print "</td></tr>";
// Company // Company
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOSTISSET("societe") ? GETPOST("societe", 'alphanohtml', 2) : $object->company).'"></td></tr>'; print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOSTISSET("societe") ? GETPOST("societe", 'alphanohtml', 2) : $object->company).'"></td></tr>';

View File

@ -598,7 +598,11 @@ while ($i < min($num, $limit)) {
if (!$i) { if (!$i) {
$totalarray['pos'][$totalarray['nbfield']] = 'd.amount'; $totalarray['pos'][$totalarray['nbfield']] = 'd.amount';
} }
$totalarray['val']['d.amount'] += $obj->subscription; if (empty($totalarray['val']['d.amount'])) {
$totalarray['val']['d.amount'] = $obj->subscription;
} else {
$totalarray['val']['d.amount'] += $obj->subscription;
}
} }
// Extra fields // Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';

View File

@ -466,13 +466,13 @@ print '</form>';
//Use draft Watermark //Use draft Watermark
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">"; print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="token" value="'.newToken().'">';
print "<input type=\"hidden\" name=\"action\" value=\"set_BOM_DRAFT_WATERMARK\">"; print '<input type="hidden" name="action" value="set_BOM_DRAFT_WATERMARK">';
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftBOMs"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>'; print $form->textwithpicto($langs->trans("WatermarkOnDraftBOMs"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>'; print '</td><td>';
print '<input class="flat minwidth200" type="text" name="BOM_DRAFT_WATERMARK" value="'.$conf->global->BOM_DRAFT_WATERMARK.'">'; print '<input class="flat minwidth200" type="text" name="BOM_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('BOM_DRAFT_WATERMARK')).'">';
print '</td><td class="right">'; print '</td><td class="right">';
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">'; print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n"; print "</td></tr>\n";

View File

@ -64,7 +64,7 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
* View * View
*/ */
$help_url = '';
llxHeader('', $langs->trans("BOMsSetup"), $help_url); llxHeader('', $langs->trans("BOMsSetup"), $help_url);

View File

@ -625,13 +625,13 @@ print '</form>';
//Use draft Watermark //Use draft Watermark
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">"; print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="token" value="'.newToken().'">';
print "<input type=\"hidden\" name=\"action\" value=\"set_COMMANDE_DRAFT_WATERMARK\">"; print '<input type="hidden" name="action" value="set_COMMANDE_DRAFT_WATERMARK">';
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftOrders"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>'; print $form->textwithpicto($langs->trans("WatermarkOnDraftOrders"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>'; print '</td><td>';
print '<input class="flat minwidth200" type="text" name="COMMANDE_DRAFT_WATERMARK" value="'.getDolGlobalString('COMMANDE_DRAFT_WATERMARK').'">'; print '<input class="flat minwidth200" type="text" name="COMMANDE_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('COMMANDE_DRAFT_WATERMARK')).'">';
print '</td><td class="right">'; print '</td><td class="right">';
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">'; print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n"; print "</td></tr>\n";

View File

@ -458,7 +458,7 @@ print '</td></tr>'."\n";
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>'; print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>'; print '</td><td>';
print '<input class="flat minwidth200" type="text" name="CONTRACT_DRAFT_WATERMARK" value="'.$conf->global->CONTRACT_DRAFT_WATERMARK.'">'; print '<input class="flat minwidth200" type="text" name="CONTRACT_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('CONTRACT_DRAFT_WATERMARK')).'">';
print '</td></tr>'."\n"; print '</td></tr>'."\n";
print '<tr class="oddeven">'; print '<tr class="oddeven">';

View File

@ -451,7 +451,7 @@ print "</td></tr>\n";
print '<tr><td>'; print '<tr><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>'; print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '<input class="flat minwidth200" type="text" name="SHIPPING_DRAFT_WATERMARK" value="'.getDolGlobalString('SHIPPING_DRAFT_WATERMARK').'">'; print '<input class="flat minwidth200" type="text" name="SHIPPING_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('SHIPPING_DRAFT_WATERMARK')).'">';
print "</td></tr>\n"; print "</td></tr>\n";
print '</table>'; print '</table>';

View File

@ -468,7 +468,7 @@ print '</td></tr>'."\n";
print '<tr class="oddeven"><td colspan="2">'; print '<tr class="oddeven"><td colspan="2">';
print $form->textwithpicto($langs->trans("WatermarkOnDraftExpenseReports"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>'; print $form->textwithpicto($langs->trans("WatermarkOnDraftExpenseReports"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '<input class="flat minwidth200" type="text" name="EXPENSEREPORT_DRAFT_WATERMARK" value="'.$conf->global->EXPENSEREPORT_DRAFT_WATERMARK.'">'; print '<input class="flat minwidth200" type="text" name="EXPENSEREPORT_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('EXPENSEREPORT_DRAFT_WATERMARK')).'">';
print '</td></tr>'."\n"; print '</td></tr>'."\n";
if (!empty($conf->project->enabled)) { if (!empty($conf->project->enabled)) {

View File

@ -761,7 +761,7 @@ print '<input type="hidden" name="action" value="set_FACTURE_DRAFT_WATERMARK" />
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftBill"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>'; print $form->textwithpicto($langs->trans("WatermarkOnDraftBill"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td>'; print '</td>';
print '<td><input class="flat minwidth200imp" type="text" name="FACTURE_DRAFT_WATERMARK" value="'.$conf->global->FACTURE_DRAFT_WATERMARK.'" />'; print '<td><input class="flat minwidth200imp" type="text" name="FACTURE_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('FACTURE_DRAFT_WATERMARK')).'">';
print '</td><td class="right">'; print '</td><td class="right">';
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'" />'; print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'" />';
print "</td></tr>\n"; print "</td></tr>\n";

View File

@ -525,7 +525,7 @@ print "<input type=\"hidden\" name=\"action\" value=\"set_FICHINTER_DRAFT_WATERM
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftInterventionCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>'; print $form->textwithpicto($langs->trans("WatermarkOnDraftInterventionCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>'; print '</td><td>';
print '<input class="flat minwidth200" type="text" name="FICHINTER_DRAFT_WATERMARK" value="'.$conf->global->FICHINTER_DRAFT_WATERMARK.'">'; print '<input class="flat minwidth200" type="text" name="FICHINTER_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('FICHINTER_DRAFT_WATERMARK')).'">';
print '</td><td class="right">'; print '</td><td class="right">';
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">'; print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n"; print "</td></tr>\n";

View File

@ -551,7 +551,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftHolidayCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>'; print $form->textwithpicto($langs->trans("WatermarkOnDraftHolidayCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>'; print '</td><td>';
print '<input class="flat minwidth200" type="text" name="HOLIDAY_DRAFT_WATERMARK" value="'.$conf->global->HOLIDAY_DRAFT_WATERMARK.'">'; print '<input class="flat minwidth200" type="text" name="HOLIDAY_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('HOLIDAY_DRAFT_WATERMARK')).'">';
print '</td></tr>'."\n"; print '</td></tr>'."\n";
} }

View File

@ -57,7 +57,7 @@ $type = 'myobject';
$arrayofparameters = array( $arrayofparameters = array(
'HRM_MAXRANK'=>array('type'=>'integer','enabled'=>1), 'HRM_MAXRANK'=>array('type'=>'integer','enabled'=>1),
'HRM_DEFAULT_SKILL_DESCRIPTION'=>array('type'=>'textarea','enabled'=>1), 'HRM_DEFAULT_SKILL_DESCRIPTION'=>array('type'=>'varchar','enabled'=>1),
); );
$error = 0; $error = 0;

View File

@ -465,7 +465,7 @@ print "<input type=\"hidden\" name=\"action\" value=\"set_MRP_MO_DRAFT_WATERMARK
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftMOs"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>'; print $form->textwithpicto($langs->trans("WatermarkOnDraftMOs"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>'; print '</td><td>';
print '<input class="flat minwidth200" type="text" name="MRP_MO_DRAFT_WATERMARK" value="'.$conf->global->MRP_MO_DRAFT_WATERMARK.'">'; print '<input class="flat minwidth200" type="text" name="MRP_MO_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('MRP_MO_DRAFT_WATERMARK')).'">';
print '</td><td class="right">'; print '</td><td class="right">';
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">'; print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n"; print "</td></tr>\n";

View File

@ -693,7 +693,7 @@ print "<input type=\"hidden\" name=\"action\" value=\"set_PROPALE_DRAFT_WATERMAR
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>'; print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>'; print '</td><td>';
print '<input class="flat minwidth200" type="text" name="PROPALE_DRAFT_WATERMARK" value="'.$conf->global->PROPALE_DRAFT_WATERMARK.'">'; print '<input class="flat minwidth200" type="text" name="PROPALE_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('PROPALE_DRAFT_WATERMARK')).'">';
print '</td><td class="right">'; print '</td><td class="right">';
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">'; print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n"; print "</td></tr>\n";

View File

@ -467,7 +467,7 @@ print "</td></tr>\n";
print '<tr><td>'; print '<tr><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext).'<br>'; print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext).'<br>';
print '<input class="flat minwidth200" type="text" name="RECEPTION_DRAFT_WATERMARK" value="'.$conf->global->RECEPTION_DRAFT_WATERMARK.'">'; print '<input class="flat minwidth200" type="text" name="RECEPTION_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('RECEPTION_DRAFT_WATERMARK')).'">';
print "</td></tr>\n"; print "</td></tr>\n";
*/ */
print '</table>'; print '</table>';

View File

@ -61,8 +61,13 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) {
dol_print_error($db); dol_print_error($db);
} }
} elseif ($action == 'updateform') { } elseif ($action == 'updateform') {
$res1 = dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", GETPOST("MAIN_APPLICATION_TITLE", 'alphanohtml'), 'chaine', 0, '', $conf->entity); $res1 = 1; $res2 = 1;
$res2 = dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", GETPOST("MAIN_SESSION_TIMEOUT", 'alphanohtml'), 'chaine', 0, '', $conf->entity); if (GETPOSTISSET('MAIN_APPLICATION_TITLE')) {
$res1 = dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", GETPOST("MAIN_APPLICATION_TITLE", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
}
if (GETPOSTISSET('MAIN_SESSION_TIMEOUT')) {
$res2 = dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", GETPOST("MAIN_SESSION_TIMEOUT", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
}
if ($res1 && $res2) { if ($res1 && $res2) {
setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
} }
@ -165,11 +170,11 @@ if (ini_get("session.gc_probability") == 0) {
} }
print '</td>'; print '</td>';
print '<td class="nowrap">'; print '<td class="nowrap">';
print '<input class="flat" name="MAIN_SESSION_TIMEOUT" type="text" size="6" value="'.dol_escape_htmltag($conf->global->MAIN_SESSION_TIMEOUT).'"> '.strtolower($langs->trans("Seconds")); print '<input class="flat right width50" name="MAIN_SESSION_TIMEOUT" type="text" value="'.dol_escape_htmltag($conf->global->MAIN_SESSION_TIMEOUT).'"> '.strtolower($langs->trans("Seconds"));
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
/*
if (empty($conf->global->MAIN_APPLICATION_TITLE)) { if (empty($conf->global->MAIN_APPLICATION_TITLE)) {
$conf->global->MAIN_APPLICATION_TITLE = ""; $conf->global->MAIN_APPLICATION_TITLE = "";
} }
@ -180,6 +185,7 @@ print '<td class="nowrap">';
print '<input class="flat" name="MAIN_APPLICATION_TITLE" type="text" size="20" value="'.dol_escape_htmltag($conf->global->MAIN_APPLICATION_TITLE).'"> '; print '<input class="flat" name="MAIN_APPLICATION_TITLE" type="text" size="20" value="'.dol_escape_htmltag($conf->global->MAIN_APPLICATION_TITLE).'"> ';
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
*/
print '</table>'; print '</table>';

View File

@ -492,7 +492,7 @@ print "<input type=\"hidden\" name=\"action\" value=\"set_SUPPLIER_PROPOSAL_DRAF
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>'; print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>'; print '</td><td>';
print '<input class="flat minwidth200" type="text" name="SUPPLIER_PROPOSAL_DRAFT_WATERMARK" value="'.$conf->global->SUPPLIER_PROPOSAL_DRAFT_WATERMARK.'">'; print '<input class="flat minwidth200" type="text" name="SUPPLIER_PROPOSAL_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('SUPPLIER_PROPOSAL_DRAFT_WATERMARK')).'">';
print '</td><td class="right">'; print '</td><td class="right">';
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">'; print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n"; print "</td></tr>\n";

View File

@ -295,7 +295,7 @@ print '</td></tr>';
if (!empty($conf->loghandlers['mod_syslog_file']) && !empty($conf->cron->enabled)) { if (!empty($conf->loghandlers['mod_syslog_file']) && !empty($conf->cron->enabled)) {
print '<tr class="oddeven"><td width="140">'.$langs->trans("SyslogFileNumberOfSaves").'</td>'; print '<tr class="oddeven"><td width="140">'.$langs->trans("SyslogFileNumberOfSaves").'</td>';
print '<td colspan="2"><input type="number" name="file_saves" placeholder="14" min="0" step="1" value="'.$conf->global->SYSLOG_FILE_SAVES.'" />'; print '<td colspan="2"><input type="number" name="file_saves" placeholder="14" min="0" step="1" value="'.getDolGlobalString('SYSLOG_FILE_SAVES').'" />';
print ' (<a href="'.dol_buildpath('/cron/list.php', 1).'?search_label=CompressSyslogs&status=-1">'.$langs->trans('ConfigureCleaningCronjobToSetFrequencyOfSaves').'</a>)</td></tr>'; print ' (<a href="'.dol_buildpath('/cron/list.php', 1).'?search_label=CompressSyslogs&status=-1">'.$langs->trans('ConfigureCleaningCronjobToSetFrequencyOfSaves').'</a>)</td></tr>';
} }

View File

@ -106,6 +106,14 @@ if (!$base) {
print '<td class="right">Collation</td>'; print '<td class="right">Collation</td>';
print "</tr>\n"; print "</tr>\n";
$arrayoffilesrich = dol_dir_list(DOL_DOCUMENT_ROOT.'/install/mysql/tables/', 'files', 0, '\.sql$');
$arrayoffiles = array();
foreach ($arrayoffilesrich as $value) {
//print $shortsqlfilename.' ';
$shortsqlfilename = preg_replace('/\-[a-z]+\./', '.', $value['name']);
$arrayoffiles[] = $shortsqlfilename;
}
$sql = "SHOW TABLE STATUS"; $sql = "SHOW TABLE STATUS";
$resql = $db->query($sql); $resql = $db->query($sql);
@ -119,7 +127,8 @@ if (!$base) {
print '<td>'.($i+1).'</td>'; print '<td>'.($i+1).'</td>';
print '<td><a href="dbtable.php?table='.$obj->Name.'">'.$obj->Name.'</a>'; print '<td><a href="dbtable.php?table='.$obj->Name.'">'.$obj->Name.'</a>';
$tablename = preg_replace('/^'.MAIN_DB_PREFIX.'/', 'llx_', $obj->Name); $tablename = preg_replace('/^'.MAIN_DB_PREFIX.'/', 'llx_', $obj->Name);
if (dol_is_file(DOL_DOCUMENT_ROOT.'/install/mysql/tables/'.$tablename.'.sql')) {
if (in_array($tablename.'.sql', $arrayoffiles)) {
$img = "info"; $img = "info";
//print img_picto($langs->trans("ExternalModule"), $img); //print img_picto($langs->trans("ExternalModule"), $img);
} else { } else {

View File

@ -41,7 +41,7 @@ class AdvanceTargetingMailing extends CommonObject
/** /**
* @var string Name of table without prefix where object is stored * @var string Name of table without prefix where object is stored
*/ */
public $table_element = 'advtargetemailing'; public $table_element = 'mailing_advtarget';
/** /**
* @var int ID * @var int ID
@ -159,7 +159,7 @@ class AdvanceTargetingMailing extends CommonObject
// Put here code to add control on parameters values // Put here code to add control on parameters values
// Insert request // Insert request
$sql = "INSERT INTO ".MAIN_DB_PREFIX."advtargetemailing("; $sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_advtarget(";
$sql .= "name,"; $sql .= "name,";
$sql .= "entity,"; $sql .= "entity,";
$sql .= "fk_element,"; $sql .= "fk_element,";
@ -188,7 +188,7 @@ class AdvanceTargetingMailing extends CommonObject
} }
if (!$error) { if (!$error) {
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."advtargetemailing"); $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."mailing_advtarget");
} }
// Commit or rollback // Commit or rollback
@ -227,7 +227,7 @@ class AdvanceTargetingMailing extends CommonObject
$sql .= " t.fk_user_mod,"; $sql .= " t.fk_user_mod,";
$sql .= " t.tms"; $sql .= " t.tms";
$sql .= " FROM ".MAIN_DB_PREFIX."advtargetemailing as t"; $sql .= " FROM ".MAIN_DB_PREFIX."mailing_advtarget as t";
$sql .= " WHERE t.rowid = ".((int) $id); $sql .= " WHERE t.rowid = ".((int) $id);
dol_syslog(get_class($this)."::fetch", LOG_DEBUG); dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
@ -282,7 +282,7 @@ class AdvanceTargetingMailing extends CommonObject
$sql .= " t.fk_user_mod,"; $sql .= " t.fk_user_mod,";
$sql .= " t.tms"; $sql .= " t.tms";
$sql .= " FROM ".MAIN_DB_PREFIX."advtargetemailing as t"; $sql .= " FROM ".MAIN_DB_PREFIX."mailing_advtarget as t";
if (!empty($id)) { if (!empty($id)) {
$sql .= " WHERE t.fk_element = ".((int) $id)." AND type_element = 'mailing'"; $sql .= " WHERE t.fk_element = ".((int) $id)." AND type_element = 'mailing'";
} else { } else {
@ -345,7 +345,7 @@ class AdvanceTargetingMailing extends CommonObject
$sql .= " t.fk_user_mod,"; $sql .= " t.fk_user_mod,";
$sql .= " t.tms"; $sql .= " t.tms";
$sql .= " FROM ".MAIN_DB_PREFIX."advtargetemailing as t"; $sql .= " FROM ".MAIN_DB_PREFIX."mailing_advtarget as t";
if (!empty($id)) { if (!empty($id)) {
$sql .= " WHERE t.fk_element = ".((int) $id)." AND type_element = '".$this->db->escape($type_element)."'"; $sql .= " WHERE t.fk_element = ".((int) $id)." AND type_element = '".$this->db->escape($type_element)."'";
} else { } else {
@ -410,7 +410,7 @@ class AdvanceTargetingMailing extends CommonObject
// Put here code to add a control on parameters values // Put here code to add a control on parameters values
// Update request // Update request
$sql = "UPDATE ".MAIN_DB_PREFIX."advtargetemailing SET"; $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_advtarget SET";
$sql .= " name=".(isset($this->name) ? "'".$this->db->escape($this->name)."'" : "''").","; $sql .= " name=".(isset($this->name) ? "'".$this->db->escape($this->name)."'" : "''").",";
$sql .= " entity=".$conf->entity.","; $sql .= " entity=".$conf->entity.",";
@ -458,7 +458,7 @@ class AdvanceTargetingMailing extends CommonObject
$this->db->begin(); $this->db->begin();
if (!$error) { if (!$error) {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."advtargetemailing"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_advtarget";
$sql .= " WHERE rowid=".((int) $this->id); $sql .= " WHERE rowid=".((int) $this->id);
dol_syslog(get_class($this)."::delete sql=".$sql); dol_syslog(get_class($this)."::delete sql=".$sql);

View File

@ -6919,7 +6919,9 @@ abstract class CommonObject
if ((string) $keyb == '') { if ((string) $keyb == '') {
continue; continue;
} }
if (strpos($valb, "|") !== false) list($valb, $parent) = explode('|', $valb); if (strpos($valb, "|") !== false) {
list($valb, $parent) = explode('|', $valb);
}
$out .= '<option value="'.$keyb.'"'; $out .= '<option value="'.$keyb.'"';
$out .= (((string) $value == (string) $keyb) ? ' selected' : ''); $out .= (((string) $value == (string) $keyb) ? ' selected' : '');
$out .= (!empty($parent) ? ' parent="'.$parent.'"' : ''); $out .= (!empty($parent) ? ' parent="'.$parent.'"' : '');

View File

@ -191,7 +191,7 @@ class FormWebsite
} }
$out = ''; $out = '';
$out .= '<select id="select'.$htmlname.'" class="selectTypeOfContainer'.($morecss? ' '.$morecss : '').'" name="'.$htmlname.'"'.($moreattrib ? ' '.$moreattrib : '').'>'; $out .= '<select id="select'.$htmlname.'" class="selectSampleOfContainer'.($morecss? ' '.$morecss : '').'" name="'.$htmlname.'"'.($moreattrib ? ' '.$moreattrib : '').'>';
if ($useempty == 1 || $useempty == 2) { if ($useempty == 1 || $useempty == 2) {
$out .= '<option value="-1">&nbsp;</option>'; $out .= '<option value="-1">&nbsp;</option>';

View File

@ -952,7 +952,7 @@ class Utils
dol_include_once('/core/lib/files.lib.php'); dol_include_once('/core/lib/files.lib.php');
$nbSaves = empty($conf->global->SYSLOG_FILE_SAVES) ? 10 : intval($conf->global->SYSLOG_FILE_SAVES); $nbSaves = intval(getDolGlobalString('SYSLOG_FILE_SAVES', 10));
if (empty($conf->global->SYSLOG_FILE)) { if (empty($conf->global->SYSLOG_FILE)) {
$mainlogdir = DOL_DATA_ROOT; $mainlogdir = DOL_DATA_ROOT;

View File

@ -102,17 +102,20 @@ function dol_print_cron_urls()
$url = $urlwithroot.'/public/cron/cron_run_jobs_by_url.php?'.(empty($conf->global->CRON_KEY) ? '' : 'securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login; $url = $urlwithroot.'/public/cron/cron_run_jobs_by_url.php?'.(empty($conf->global->CRON_KEY) ? '' : 'securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login;
print '<div class="urllink">'; print '<div class="urllink">';
print '<input type="text" id="publicurlmember" class="quatrevingtpercentminusx" value="'.$url.'">'; print '<input type="text" id="publicurlmember" class="quatrevingtpercentminusx" value="'.$url.'">';
print img_picto('', 'globe').' <a href="'.$url.'" target="_blank" rel="noopener noreferrer">'.$url."</a>"; print ' <a href="'.$url.'" target="_blank" rel="noopener noreferrer">'.img_picto('', 'globe')."</a>\n";
print '</div>'; print '</div>';
print '</div>'; print '<br> '.$langs->trans("OrToLaunchASpecificJob").'<br>';
print "<br>\n";
print ' '.$langs->trans("OrToLaunchASpecificJob");
print '<br>';
$url = $urlwithroot.'/public/cron/cron_run_jobs_by_url.php?'.(empty($conf->global->CRON_KEY) ? '' : 'securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login.'&id=cronjobid'; $url = $urlwithroot.'/public/cron/cron_run_jobs_by_url.php?'.(empty($conf->global->CRON_KEY) ? '' : 'securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login.'&id=cronjobid';
print img_picto('', 'globe').' <a href="'.$url.'" target="_blank" rel="noopener noreferrer">'.$url."</a><br>\n"; print '<div class="urllink">';
print '<input type="text" id="publicurlmemberall" class="quatrevingtpercentminusx" value="'.$url.'">';
print ' <a href="'.$url.'" target="_blank" rel="noopener noreferrer">'.img_picto('', 'globe')."</a>\n";
print '</div>';
print '</div>'; print '</div>';
print '<br>'; print '<br>';
print ajax_autoselect("publicurlmember");
print ajax_autoselect("publicurlmemberall");
$logintouse = 'firstadmin'; $logintouse = 'firstadmin';
if ($user->admin) { if ($user->admin) {
$logintouse = $user->login; $logintouse = $user->login;

View File

@ -3948,7 +3948,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'off', 'on', 'order', 'off', 'on', 'order',
'paiment', 'paragraph', 'play', 'pdf', 'phone', 'phoning', 'phoning_mobile', 'phoning_fax', 'playdisabled', 'previous', 'poll', 'pos', 'printer', 'product', 'propal', 'puce', 'paiment', 'paragraph', 'play', 'pdf', 'phone', 'phoning', 'phoning_mobile', 'phoning_fax', 'playdisabled', 'previous', 'poll', 'pos', 'printer', 'product', 'propal', 'puce',
'stock', 'resize', 'service', 'stats', 'trip', 'stock', 'resize', 'service', 'stats', 'trip',
'security', 'setup', 'share-alt', 'sign-out', 'split', 'stripe', 'stripe-s', 'switch_off', 'switch_on', 'switch_on_red', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench', 'security', 'setup', 'share-alt', 'sign-out', 'split', 'stripe', 'stripe-s', 'switch_off', 'switch_on', 'switch_on_red', 'tools', 'unlink', 'uparrow', 'user', 'user-tie', 'vcard', 'wrench',
'github', 'google', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp', 'github', 'google', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies', 'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies',
'generic', 'home', 'hrm', 'members', 'products', 'invoicing', 'generic', 'home', 'hrm', 'members', 'products', 'invoicing',

View File

@ -2240,7 +2240,7 @@ function get_left_menu_hrm($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu =
$newmenu->add("/user/card.php?mainmenu=hrm&leftmenu=hrm&action=create&employee=1", $langs->trans("NewEmployee"), 1, $user->rights->user->user->creer); $newmenu->add("/user/card.php?mainmenu=hrm&leftmenu=hrm&action=create&employee=1", $langs->trans("NewEmployee"), 1, $user->rights->user->user->creer);
$newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee&contextpage=employeelist", $langs->trans("List"), 1, $user->rights->user->user->lire); $newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee&contextpage=employeelist", $langs->trans("List"), 1, $user->rights->user->user->lire);
$newmenu->add("/hrm/skill_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("SkillsManagement"), 0, $user->rights->hrm->all->read, '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'user', 'class="pictofixedwidth"')); $newmenu->add("/hrm/skill_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("SkillsManagement"), 0, $user->rights->hrm->all->read, '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'shapes', 'class="pictofixedwidth"'));
// Skills // Skills
$newmenu->add("/hrm/skill_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("Skills"), 1, $user->rights->hrm->all->read, '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'shapes', 'class="pictofixedwidth"')); $newmenu->add("/hrm/skill_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("Skills"), 1, $user->rights->hrm->all->read, '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'shapes', 'class="pictofixedwidth"'));

View File

@ -78,7 +78,7 @@ class mod_asset_advanced extends ModeleNumRefAsset
// Parametrage du prefix // Parametrage du prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>'; $texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskAsset" value="'.$conf->global->ASSET_ASSET_ADVANCED_MASK.'">', $tooltip, 1, 1).'</td>'; $texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskAsset" value="'.getDolGlobalString('ASSET_ASSET_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>'; $texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
@ -131,7 +131,7 @@ class mod_asset_advanced extends ModeleNumRefAsset
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule // We get cursor rule
$mask = $conf->global->ASSET_ASSET_ADVANCED_MASK; $mask = getDolGlobalString('ASSET_ASSET_ADVANCED_MASK');
if (!$mask) { if (!$mask) {
$this->error = 'NotConfigured'; $this->error = 'NotConfigured';

View File

@ -79,7 +79,7 @@ class mod_bom_advanced extends ModeleNumRefboms
// Parametrage du prefix // Parametrage du prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>'; $texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskBom" value="'.$conf->global->BOM_ADVANCED_MASK.'">', $tooltip, 1, 1).'</td>'; $texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskBom" value="'.getDolGlobalString('BOM_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>'; $texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
@ -128,7 +128,7 @@ class mod_bom_advanced extends ModeleNumRefboms
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule // We get cursor rule
$mask = $conf->global->BOM_ADVANCED_MASK; $mask = getDolGlobalString('BOM_ADVANCED_MASK');
if (!$mask) { if (!$mask) {
$this->error = 'NotConfigured'; $this->error = 'NotConfigured';

View File

@ -79,9 +79,9 @@ class mod_evaluation_advanced extends ModeleNumRefEvaluation
// Parametrage du prefix // Parametrage du prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>'; $texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskEvaluation" value="'.$conf->global->HRM_EVALUATION_ADVANCED_MASK.'">', $tooltip, 1, 1).'</td>'; $texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskEvaluation" value="'.getDolGlobalString('HRM_EVALUATION_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>'; $texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button smallpaddingimp" value="'.$langs->trans("Modify").'" name="Button"></td>';
$texte .= '</tr>'; $texte .= '</tr>';
@ -132,7 +132,7 @@ class mod_evaluation_advanced extends ModeleNumRefEvaluation
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule // We get cursor rule
$mask = $conf->global->HRM_EVALUATION_ADVANCED_MASK; $mask = getDolGlobalString('HRM_EVALUATION_ADVANCED_MASK');
if (!$mask) { if (!$mask) {
$this->error = 'NotConfigured'; $this->error = 'NotConfigured';

View File

@ -125,7 +125,7 @@ class doc_generic_member_odt extends ModelePDFMember
// List of directories area // List of directories area
$texte .= '<tr><td>'; $texte .= '<tr><td>';
$texttitle = $langs->trans("ListOfDirectories"); $texttitle = $langs->trans("ListOfDirectories");
$listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->MEMBER_ADDON_PDF_ODT_PATH))); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim(getDolGlobalString('MEMBER_ADDON_PDF_ODT_PATH'))));
$listoffiles = array(); $listoffiles = array();
foreach ($listofdir as $key => $tmpdir) { foreach ($listofdir as $key => $tmpdir) {
$tmpdir = trim($tmpdir); $tmpdir = trim($tmpdir);
@ -151,7 +151,7 @@ class doc_generic_member_odt extends ModelePDFMember
$texte .= $form->textwithpicto($texttitle, $texthelp, 1, 'help', '', 1); $texte .= $form->textwithpicto($texttitle, $texthelp, 1, 'help', '', 1);
$texte .= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">'; $texte .= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
$texte .= '<textarea class="flat" cols="60" name="value1">'; $texte .= '<textarea class="flat" cols="60" name="value1">';
$texte .= $conf->global->MEMBER_ADDON_PDF_ODT_PATH; $texte .= getDolGlobalString('MEMBER_ADDON_PDF_ODT_PATH');
$texte .= '</textarea>'; $texte .= '</textarea>';
$texte .= '</div><div style="display: inline-block; vertical-align: middle;">'; $texte .= '</div><div style="display: inline-block; vertical-align: middle;">';
$texte .= '<input type="submit" class="button small reposition" name="modify" value="'.$langs->trans("Modify").'">'; $texte .= '<input type="submit" class="button small reposition" name="modify" value="'.$langs->trans("Modify").'">';

View File

@ -80,7 +80,7 @@ class mod_mo_advanced extends ModeleNumRefMos
// Parametrage du prefix // Parametrage du prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>'; $texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskMo" value="'.$conf->global->MRP_MO_ADVANCED_MASK.'">', $tooltip, 1, 1).'</td>'; $texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskMo" value="'.getDolGlobalString('MRP_MO_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>'; $texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
@ -129,7 +129,7 @@ class mod_mo_advanced extends ModeleNumRefMos
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule // We get cursor rule
$mask = $conf->global->MRP_MO_ADVANCED_MASK; $mask = getDolGlobalString('MRP_MO_ADVANCED_MASK');
if (!$mask) { if (!$mask) {
$this->error = 'NotConfigured'; $this->error = 'NotConfigured';

View File

@ -67,7 +67,11 @@ class PrintingDriver
$list = array(); $list = array();
$listoffiles = array(); $listoffiles = array();
$dirmodels = array_merge(array('/core/modules/printing/'), (array) $conf->modules_parts['printing']); if (!empty($conf->modules_parts['printing'])) {
$dirmodels = array_merge(array('/core/modules/printing/'), (array) $conf->modules_parts['printing']);
} else {
$dirmodels = array('/core/modules/printing/');
}
foreach ($dirmodels as $dir) { foreach ($dirmodels as $dir) {
$tmpfiles = dol_dir_list(dol_buildpath($dir, 0), 'all', 0, '\.modules.php', '', 'name', SORT_ASC, 0); $tmpfiles = dol_dir_list(dol_buildpath($dir, 0), 'all', 0, '\.modules.php', '', 'name', SORT_ASC, 0);
if (!empty($tmpfiles)) { if (!empty($tmpfiles)) {

View File

@ -116,8 +116,8 @@ class printing_printgcp extends PrintingDriver
'type'=>'info', 'type'=>'info',
); );
} else { } else {
$this->google_id = $conf->global->OAUTH_GOOGLE_ID; $this->google_id = getDolGlobalString('OAUTH_GOOGLE_ID');
$this->google_secret = $conf->global->OAUTH_GOOGLE_SECRET; $this->google_secret = getDolGlobalString('OAUTH_GOOGLE_SECRET');
// Token storage // Token storage
$storage = new DoliStorage($this->db, $this->conf); $storage = new DoliStorage($this->db, $this->conf);
//$storage->clearToken($this->OAUTH_SERVICENAME_GOOGLE); //$storage->clearToken($this->OAUTH_SERVICENAME_GOOGLE);

View File

@ -66,7 +66,7 @@ class mod_lot_advanced extends ModeleNumRefBatch
$form = new Form($db); $form = new Form($db);
// We get cursor rule // We get cursor rule
$mask = isset($conf->global->LOT_ADVANCED_MASK) ? $conf->global->LOT_ADVANCED_MASK : ''; $mask = getDolGlobalString('LOT_ADVANCED_MASK');
$texte = $langs->trans('GenericNumRefModelDesc')."<br>\n"; $texte = $langs->trans('GenericNumRefModelDesc')."<br>\n";
$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; $texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
@ -142,7 +142,7 @@ class mod_lot_advanced extends ModeleNumRefBatch
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule // We get cursor rule
$mask = isset($conf->global->LOT_ADVANCED_MASK) ? $conf->global->LOT_ADVANCED_MASK : ''; $mask = getDolGlobalString('LOT_ADVANCED_MASK');
if (!$mask) { if (!$mask) {
$this->error = 'NotConfigured'; $this->error = 'NotConfigured';

View File

@ -66,7 +66,7 @@ class mod_sn_advanced extends ModeleNumRefBatch
$form = new Form($db); $form = new Form($db);
// We get cursor rule // We get cursor rule
$mask = isset($conf->global->SN_ADVANCED_MASK) ? $conf->global->SN_ADVANCED_MASK : ''; $mask = getDolGlobalString('SN_ADVANCED_MASK');
$texte = $langs->trans('GenericNumRefModelDesc')."<br>\n"; $texte = $langs->trans('GenericNumRefModelDesc')."<br>\n";
$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; $texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
@ -142,7 +142,7 @@ class mod_sn_advanced extends ModeleNumRefBatch
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule // We get cursor rule
$mask = isset($conf->global->SN_ADVANCED_MASK) ? $conf->global->SN_ADVANCED_MASK : ''; $mask = getDolGlobalString('SN_ADVANCED_MASK');
if (!$mask) { if (!$mask) {
$this->error = 'NotConfigured'; $this->error = 'NotConfigured';

View File

@ -80,7 +80,7 @@ class mod_stocktransfer_advanced extends ModeleNumRefStockTransfer
// Parametrage du prefix // Parametrage du prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>'; $texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskStockTransfer" value="'.$conf->global->STOCKTRANSFER_STOCKTRANSFER_ADVANCED_MASK.'">', $tooltip, 1, 1).'</td>'; $texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskStockTransfer" value="'.getDolGlobalString('STOCKTRANSFER_STOCKTRANSFER_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>'; $texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
@ -133,7 +133,7 @@ class mod_stocktransfer_advanced extends ModeleNumRefStockTransfer
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule // We get cursor rule
$mask = $conf->global->STOCKTRANSFER_STOCKTRANSFER_ADVANCED_MASK; $mask = getDolGlobalString('STOCKTRANSFER_STOCKTRANSFER_ADVANCED_MASK');
if (!$mask) { if (!$mask) {
$this->error = 'NotConfigured'; $this->error = 'NotConfigured';

View File

@ -80,7 +80,7 @@ class mod_workstation_advanced extends ModeleNumRefWorkstation
// Parametrage du prefix // Parametrage du prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>'; $texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskWorkstation" value="'.$conf->global->WORKSTATION_WORKSTATION_ADVANCED_MASK.'">', $tooltip, 1, 1).'</td>'; $texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskWorkstation" value="'.getDolGlobalString('WORKSTATION_WORKSTATION_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>'; $texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
@ -133,7 +133,7 @@ class mod_workstation_advanced extends ModeleNumRefWorkstation
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule // We get cursor rule
$mask = $conf->global->WORKSTATION_WORKSTATION_ADVANCED_MASK; $mask = getDolGlobalString('WORKSTATION_WORKSTATION_ADVANCED_MASK');
if (!$mask) { if (!$mask) {
$this->error = 'NotConfigured'; $this->error = 'NotConfigured';

View File

@ -38,7 +38,7 @@ $langs->load("modulebuilder");
<!-- BEGIN PHP TEMPLATE admin_extrafields_view.tpl.php --> <!-- BEGIN PHP TEMPLATE admin_extrafields_view.tpl.php -->
<?php <?php
print '<span class="opacitymedium">'.$langs->trans("DefineHereComplementaryAttributes", $textobject).'</span><br>'."\n"; print '<span class="opacitymedium">'.$langs->trans("DefineHereComplementaryAttributes", empty($textobject) ? '': $textobject).'</span><br>'."\n";
print '<br>'; print '<br>';
// Load $extrafields->attributes // Load $extrafields->attributes

View File

@ -76,7 +76,7 @@ class Skill extends CommonObject
const STATUS_DRAFT = 0; const STATUS_DRAFT = 0;
const STATUS_VALIDATED = 1; const STATUS_VALIDATED = 1;
const STATUS_CANCELED = 9; const STATUS_CANCELED = 9;
const DEFAULT_MAX_RANK_PER_SKILL = 5; const DEFAULT_MAX_RANK_PER_SKILL = 3;
/** /**
* 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') * 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
@ -251,7 +251,7 @@ class Skill extends CommonObject
global $conf, $user, $langs; global $conf, $user, $langs;
$MaxNumberSkill = isset($conf->global->HRM_MAXRANK) ? $conf->global->HRM_MAXRANK : self::DEFAULT_MAX_RANK_PER_SKILL; $MaxNumberSkill = isset($conf->global->HRM_MAXRANK) ? $conf->global->HRM_MAXRANK : self::DEFAULT_MAX_RANK_PER_SKILL;
$defaultSkillDesc = !empty($conf->global->HRM_DEFAULT_SKILL_DESCRIPTION) ? $conf->global->HRM_DEFAULT_SKILL_DESCRIPTION : 'no Description'; $defaultSkillDesc = !empty($conf->global->HRM_DEFAULT_SKILL_DESCRIPTION) ? $conf->global->HRM_DEFAULT_SKILL_DESCRIPTION : $langs->trans("NoDescription");
$error = 0; $error = 0;

View File

@ -123,11 +123,11 @@ if (empty($reshook)) {
// Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
include DOL_DOCUMENT_ROOT . '/core/actions_addupdatedelete.inc.php'; $noback = 1;
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
// action update on Skilldet // action update on Skilldet
$skilldetArray = GETPOST("descriptionline", "array:alphanohtml");
$skilldetArray = GETPOST("descriptionline", "array");
if (!$error) { if (!$error) {
if (is_array($skilldetArray) && count($skilldetArray) > 0) { if (is_array($skilldetArray) && count($skilldetArray) > 0) {

View File

@ -141,14 +141,18 @@ class DoliStorage implements TokenStorageInterface
dol_syslog("hasAccessToken service=".$service); dol_syslog("hasAccessToken service=".$service);
$sql = "SELECT token FROM ".MAIN_DB_PREFIX."oauth_token"; $sql = "SELECT token FROM ".MAIN_DB_PREFIX."oauth_token";
$sql .= " WHERE service = '".$this->db->escape($service.($this->keyforprovider?'-'.$this->keyforprovider:''))."'"; $sql .= " WHERE service = '".$this->db->escape($service.(empty($this->keyforprovider) ? '' : '-'.$this->keyforprovider))."'";
$sql .= " AND entity IN (".getEntity('oauth_token').")"; $sql .= " AND entity IN (".getEntity('oauth_token').")";
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if (! $resql) { if (! $resql) {
dol_print_error($this->db); dol_print_error($this->db);
} }
$result = $this->db->fetch_array($resql); $result = $this->db->fetch_array($resql);
$token = unserialize($result['token']); if ($result) {
$token = unserialize($result['token']);
} else {
$token = '';
}
$this->tokens[$service] = $token; $this->tokens[$service] = $token;

View File

@ -137,6 +137,10 @@ ALTER TABLE llx_bank ADD COLUMN amount_main_currency double(24,8) NULL;
-- v16 -- v16
DROP TABLE llx_payment_salary_extrafields;
DROP TABLE llx_asset_model_extrafields;
DROP TABLE llx_asset_type_extrafields;
ALTER TABLE llx_projet_task_time ADD COLUMN intervention_id integer DEFAULT NULL; ALTER TABLE llx_projet_task_time ADD COLUMN intervention_id integer DEFAULT NULL;
ALTER TABLE llx_projet_task_time ADD COLUMN intervention_line_id integer DEFAULT NULL; ALTER TABLE llx_projet_task_time ADD COLUMN intervention_line_id integer DEFAULT NULL;

View File

@ -79,7 +79,7 @@ class mod_knowledgerecord_advanced extends ModeleNumRefKnowledgeRecord
// Parametrage du prefix // Parametrage du prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>'; $texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskKnowledgeRecord" value="'.$conf->global->KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADVANCED_MASK.'">', $tooltip, 1, 1).'</td>'; $texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskKnowledgeRecord" value="'.getDolGlobalString('KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>'; $texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
@ -132,7 +132,7 @@ class mod_knowledgerecord_advanced extends ModeleNumRefKnowledgeRecord
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule // We get cursor rule
$mask = $conf->global->KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADVANCED_MASK; $mask = getDolGlobalString('KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADVANCED_MASK');
if (!$mask) { if (!$mask) {
$this->error = 'NotConfigured'; $this->error = 'NotConfigured';

View File

@ -88,4 +88,5 @@ DeleteSkill = Skill removed
SkillsExtraFields=Attributs supplémentaires (Compétences) SkillsExtraFields=Attributs supplémentaires (Compétences)
JobsExtraFields=Attributs supplémentaires (Emplois) JobsExtraFields=Attributs supplémentaires (Emplois)
EvaluationsExtraFields=Attributs supplémentaires (Evaluations) EvaluationsExtraFields=Attributs supplémentaires (Evaluations)
NeedBusinessTravels=Need business travels NeedBusinessTravels=Need business travels
NoDescription=No description

View File

@ -70,8 +70,18 @@ class MyObject extends CommonObject
/** /**
* 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter[:Sortfield]]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') * 'type' field format:
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)" * 'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]',
* 'select' (list of values are in 'options'),
* 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter[:Sortfield]]]]',
* 'chkbxlst:...',
* 'varchar(x)',
* 'text', 'text:none', 'html',
* 'double(24,8)', 'real', 'price',
* 'date', 'datetime', 'timestamp', 'duration',
* 'boolean', 'checkbox', 'radio', 'array',
* 'mail', 'phone', 'url', 'password', 'ip'
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
* 'label' the translation key. * 'label' the translation key.
* 'picto' is code of a picto to show before value in forms * 'picto' is code of a picto to show before value in forms
* 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM' or '!empty($conf->multicurrency->enabled)' ...) * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM' or '!empty($conf->multicurrency->enabled)' ...)

View File

@ -898,8 +898,8 @@ class pdf_standard_myobject extends ModelePDFMyObject
pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
// Show Draft Watermark // Show Draft Watermark
if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->FACTURE_DRAFT_WATERMARK))) { if ($object->statut == $object::STATUS_DRAFT && getDolGlobalString('MYMODULE_DRAFT_WATERMARK')) {
pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->FACTURE_DRAFT_WATERMARK); pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', dol_escape_htmltag(getDolGlobalString('MYMODULE_DRAFT_WATERMARK')));
} }
$pdf->SetTextColor(0, 0, 60); $pdf->SetTextColor(0, 0, 60);

View File

@ -79,7 +79,7 @@ class mod_myobject_advanced extends ModeleNumRefMyObject
// Parametrage du prefix // Parametrage du prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>'; $texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskvalue" value="'.$conf->global->MYMODULE_MYOBJECT_ADVANCED_MASK.'">', $tooltip, 1, 1).'</td>'; $texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskvalue" value="'.getDolGlobalString('MYMODULE_MYOBJECT_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'" name="Button"></td>'; $texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'" name="Button"></td>';
$texte .= '</tr>'; $texte .= '</tr>';
@ -130,7 +130,7 @@ class mod_myobject_advanced extends ModeleNumRefMyObject
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule // We get cursor rule
$mask = $conf->global->MYMODULE_MYOBJECT_ADVANCED_MASK; $mask = getDolGlobalString('MYMODULE_MYOBJECT_ADVANCED_MASK');
if (!$mask) { if (!$mask) {
$this->error = 'NotConfigured'; $this->error = 'NotConfigured';

View File

@ -79,7 +79,7 @@ class mod_partnership_advanced extends ModeleNumRefPartnership
// Parametrage du prefix // Parametrage du prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>'; $texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskPartnership" value="'.$conf->global->PARTNERSHIP_ADVANCED_MASK.'">', $tooltip, 1, 1).'</td>'; $texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskPartnership" value="'.getDolGlobalString('PARTNERSHIP_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>'; $texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
@ -132,7 +132,7 @@ class mod_partnership_advanced extends ModeleNumRefPartnership
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule // We get cursor rule
$mask = $conf->global->PARTNERSHIP_ADVANCED_MASK; $mask = getDolGlobalString('PARTNERSHIP_ADVANCED_MASK');
if (!$mask) { if (!$mask) {
$this->error = 'NotConfigured'; $this->error = 'NotConfigured';

View File

@ -135,7 +135,12 @@ if ($mode == 'setup' && $user->admin) {
$submit_enabled = 0; $submit_enabled = 0;
if (!empty($driver)) { if (!empty($driver)) {
$dirmodels = array_merge(array('/core/modules/printing/'), (array) $conf->modules_parts['printing']); if (!empty($conf->modules_parts['printing'])) {
$dirmodels = array_merge(array('/core/modules/printing/'), (array) $conf->modules_parts['printing']);
} else {
$dirmodels = array('/core/modules/printing/');
}
foreach ($dirmodels as $dir) { foreach ($dirmodels as $dir) {
if (file_exists(dol_buildpath($dir, 0).$driver.'.modules.php')) { if (file_exists(dol_buildpath($dir, 0).$driver.'.modules.php')) {
$classfile = dol_buildpath($dir, 0).$driver.'.modules.php'; $classfile = dol_buildpath($dir, 0).$driver.'.modules.php';
@ -253,7 +258,13 @@ if ($mode == 'config' && $user->admin) {
$object = new PrintingDriver($db); $object = new PrintingDriver($db);
$result = $object->listDrivers($db, 10); $result = $object->listDrivers($db, 10);
$dirmodels = array_merge(array('/core/modules/printing/'), (array) $conf->modules_parts['printing']);
if (!empty($conf->modules_parts['printing'])) {
$dirmodels = array_merge(array('/core/modules/printing/'), (array) $conf->modules_parts['printing']);
} else {
$dirmodels = array('/core/modules/printing/');
}
foreach ($result as $driver) { foreach ($result as $driver) {
foreach ($dirmodels as $dir) { foreach ($dirmodels as $dir) {
if (file_exists(dol_buildpath($dir, 0).$driver.'.modules.php')) { if (file_exists(dol_buildpath($dir, 0).$driver.'.modules.php')) {
@ -296,7 +307,12 @@ if ($mode == 'test' && $user->admin) {
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
if (!empty($driver)) { if (!empty($driver)) {
$dirmodels = array_merge(array('/core/modules/printing/'), (array) $conf->modules_parts['printing']); if (!empty($conf->modules_parts['printing'])) {
$dirmodels = array_merge(array('/core/modules/printing/'), (array) $conf->modules_parts['printing']);
} else {
$dirmodels = array('/core/modules/printing/');
}
foreach ($dirmodels as $dir) { foreach ($dirmodels as $dir) {
if (file_exists(dol_buildpath($dir, 0).$driver.'.modules.php')) { if (file_exists(dol_buildpath($dir, 0).$driver.'.modules.php')) {
$classfile = dol_buildpath($dir, 0).$driver.'.modules.php'; $classfile = dol_buildpath($dir, 0).$driver.'.modules.php';

View File

@ -59,7 +59,7 @@ foreach ($result as $driver) {
$langs->load($driver); $langs->load($driver);
$printer = new $classname($db); $printer = new $classname($db);
$keyforprinteractive = $printer->active; $keyforprinteractive = $printer->active;
if ($keyforprinteractive && $conf->global->$keyforprinteractive) { if ($keyforprinteractive && getDolGlobalString($keyforprinteractive)) {
//$printer->listJobs('commande'); //$printer->listJobs('commande');
$result = $printer->listJobs(); $result = $printer->listJobs();
print $printer->resprint; print $printer->resprint;

View File

@ -1352,8 +1352,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if ((!empty($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) && $conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced') if ((!empty($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) && $conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced')
|| (!empty($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS) && $conf->global->PRODUCTBATCH_SN_ADDON == 'mod_sn_advanced')) { || (!empty($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS) && $conf->global->PRODUCTBATCH_SN_ADDON == 'mod_sn_advanced')) {
print '<tr><td id="mask_option">'.$langs->trans("ManageLotMask").'</td>'; print '<tr><td id="mask_option">'.$langs->trans("ManageLotMask").'</td>';
$inherited_mask_lot = $conf->global->LOT_ADVANCED_MASK; $inherited_mask_lot = getDolGlobalString('LOT_ADVANCED_MASK');
$inherited_mask_sn = $conf->global->SN_ADVANCED_MASK; $inherited_mask_sn = getDolGlobalString('SN_ADVANCED_MASK');
print '<td id="field_mask">'; print '<td id="field_mask">';
print $form->textwithpicto('<input type="text" class="flat minwidth175" name="batch_mask" id="batch_mask_input">', $tooltip, 1, 1); print $form->textwithpicto('<input type="text" class="flat minwidth175" name="batch_mask" id="batch_mask_input">', $tooltip, 1, 1);
print '<script type="text/javascript"> print '<script type="text/javascript">
@ -1365,7 +1365,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
var valueSelected = this.value; var valueSelected = this.value;
$("#field_mask, #mask_option").addClass("hideobject"); $("#field_mask, #mask_option").addClass("hideobject");
'; ';
if ($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS && $conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced') { if (getDolGlobalString('PRODUCTBATCH_LOT_USE_PRODUCT_MASKS') && getDolGlobalString('PRODUCTBATCH_LOT_ADDON') == 'mod_lot_advanced') {
print ' print '
if (this.value == 1) { if (this.value == 1) {
$("#field_mask, #mask_option").toggleClass("hideobject"); $("#field_mask, #mask_option").toggleClass("hideobject");

View File

@ -817,8 +817,8 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
// Show Draft Watermark // Show Draft Watermark
if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->RECRUITMENT_RECRUITMENTJOBPOSITION_DRAFT_WATERMARK))) { if ($object->statut == $object::STATUS_DRAFT && getDolGlobalString('RECRUITMENT_RECRUITMENTJOBPOSITION_DRAFT_WATERMARK')) {
pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->RECRUITMENT_RECRUITMENTJOBPOSITION_DRAFT_WATERMARK); pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', getDolGlobalString('RECRUITMENT_RECRUITMENTJOBPOSITION_DRAFT_WATERMARK'));
} }
$pdf->SetTextColor(0, 0, 60); $pdf->SetTextColor(0, 0, 60);

View File

@ -4876,11 +4876,11 @@ div#card-errors {
} }
.ui-dialog-content { .ui-dialog-content {
} }
.ui-dialog.ui-corner-all.ui-widget.ui-widget-content.ui-front.ui-draggable {
.ui-dialog.ui-corner-all.ui-widget.ui-widget-content.ui-front.ui-dialog-buttons.ui-draggable { z-index: 1002 !important; /* Default 101 with ui-jquery, top menu have a z-index of 1000 */
z-index: 1002 !important; /* Default 101 with jquery, top menu have a z-index of 1000 */
} }
/* ============================================================================== */ /* ============================================================================== */
/* For content of image preview */ /* For content of image preview */
/* ============================================================================== */ /* ============================================================================== */

View File

@ -4729,9 +4729,8 @@ div#card-errors {
.ui-dialog-content { .ui-dialog-content {
font-size: <?php print $fontsize; ?>px !important; font-size: <?php print $fontsize; ?>px !important;
} }
.ui-dialog.ui-corner-all.ui-widget.ui-widget-content.ui-front.ui-draggable {
.ui-dialog.ui-corner-all.ui-widget.ui-widget-content.ui-front.ui-dialog-buttons.ui-draggable { z-index: 1002 !important; /* Default 101 with ui-jquery, top menu have a z-index of 1000 */
z-index: 1002 !important; /* Default 101 with jquery, top menu have a z-index of 1000 */
} }
div#dialogforpopup { div#dialogforpopup {

View File

@ -1086,7 +1086,7 @@ class Website extends CommonObject
$line .= "'".$this->db->escape($stringtoexport)."', "; // Replace \r \n to have record on 1 line $line .= "'".$this->db->escape($stringtoexport)."', "; // Replace \r \n to have record on 1 line
$line .= "'".$this->db->escape($objectpageold->author_alias)."', "; $line .= "'".$this->db->escape($objectpageold->author_alias)."', ";
$line .= "'".$this->db->escape($objectpageold->allowed_in_frames)."'"; $line .= (int) $objectpageold->allowed_in_frames;
$line .= ");"; $line .= ");";
$line .= "\n"; $line .= "\n";

View File

@ -3798,7 +3798,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties
print '<tr><td class="titlefield fieldrequired">'; print '<tr><td class="titlefield fieldrequired">';
print $langs->trans('WEBSITE_PAGE_EXAMPLE'); print $langs->trans('WEBSITE_PAGE_EXAMPLE');
print '</td><td>'; print '</td><td>';
print $formwebsite->selectSampleOfContainer('sample', (GETPOSTISSET('sample') ? GETPOST('sample', 'alpha') : 'empty'), 0, '', 1); print $formwebsite->selectSampleOfContainer('sample', (GETPOSTISSET('sample') ? GETPOST('sample', 'alpha') : 'empty'), 0, '', 1, 'minwidth300');
print '</td></tr>'; print '</td></tr>';
} }
@ -3989,7 +3989,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties
print '<tr><td>'; print '<tr><td>';
print $langs->trans('PublicAuthorAlias'); print $langs->trans('PublicAuthorAlias');
print '</td><td>'; print '</td><td>';
print '<input type="text" class="flat minwidth300" name="WEBSITE_AUTHORALIAS" value="'.dol_escape_htmltag($pageauthoralias).'">'; print '<input type="text" class="flat minwidth300" name="WEBSITE_AUTHORALIAS" value="'.dol_escape_htmltag($pageauthoralias).'" placeholder="Anonymous">';
print '</td></tr>'; print '</td></tr>';
print '<tr><td>'; print '<tr><td>';