Skip to content

Commit

Permalink
Merge branch 'develop' into New-file-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy authored Dec 19, 2024
2 parents c18e234 + 80b4854 commit 2fcb00c
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 10 deletions.
4 changes: 2 additions & 2 deletions htdocs/comm/action/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,7 @@ function init_repeat()
$("#addreminder").prop("checked", true);
// Set period with default reminder period
$("[name=\"offsetvalue\"]").val(\'' . dol_escape_js($reminderDefaultOffset) . '\');
$("[name=\"offsetvalue\"]").val(\'' . dol_escape_js((string) $reminderDefaultOffset) . '\');
$("#select_offsetunittype_duration").select2("destroy");
$("#select_offsetunittype_duration").val(\''.dol_escape_js($reminderDefaultUnit).'\');
$("#select_offsetunittype_duration").select2();
Expand All @@ -1832,7 +1832,7 @@ function init_repeat()
// Set default reminder mail model
$("#select_actioncommsendmodel_mail").closest("tr").show();
$("#select_actioncommsendmodel_mail").select2("destroy");
$("#select_actioncommsendmodel_mail").val(\''.dol_escape_js($reminderDefaultEmailModel).'\');
$("#select_actioncommsendmodel_mail").val(\''.dol_escape_js((string) $reminderDefaultEmailModel).'\');
$("#select_actioncommsendmodel_mail").select2();
}
});
Expand Down
4 changes: 4 additions & 0 deletions htdocs/contact/class/contact.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,10 @@ public function create($user, $notrigger = 0)
$error = 0;
$now = dol_now();

if (empty($this->date_creation)) {
$this->date_creation = $now;
}

$this->db->begin();

// Clean parameters
Expand Down
1 change: 1 addition & 0 deletions htdocs/core/class/commonobject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -10333,6 +10333,7 @@ public function createCommon(User $user, $notrigger = 0)

if (array_key_exists('date_creation', $fieldvalues) && empty($fieldvalues['date_creation'])) {
$fieldvalues['date_creation'] = $this->db->idate($now);
$this->date_creation = $this->db->idate($now);
}
if (array_key_exists('fk_user_creat', $fieldvalues) && !($fieldvalues['fk_user_creat'] > 0)) {
$fieldvalues['fk_user_creat'] = $user->id;
Expand Down
6 changes: 5 additions & 1 deletion htdocs/core/class/html.form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2237,7 +2237,11 @@ public function select_dolusers($selected = '', $htmlname = 'userid', $show_empt
if ($errormessage) {
$this->errors[] = $errormessage;
dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
if ($outputmode == 0) {
return 'Error bad param $morefilter';
} else {
return array();
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/lib/website2.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ function checkPHPCode(&$phpfullcodestringold, &$phpfullcodestring)
if (!$error) {
if (preg_match('/\*\/\s*\(/ims', $phpfullcodestring)) {
$error++;
setEventMessages($langs->trans("DynamicPHPCodeContainsAForbiddenInstruction", $forbiddenphpmethod), null, 'errors');
setEventMessages($langs->trans("DynamicPHPCodeContainsAForbiddenInstruction", "exec/*...*/ ('ls')"), null, 'errors');
}
}

Expand Down
8 changes: 4 additions & 4 deletions htdocs/core/tpl/login.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,19 +282,19 @@
<div class="tagtable left centpercent" title="<?php echo $langs->trans("EnterLoginDetail"); ?>">

<!-- Login -->
<?php if (!isset($conf->file->main_authentication) || $conf->file->main_authentication != 'googleoauth') { ?>
<div class="trinputlogin">
<div class="tagtd nowraponall center valignmiddle tdinputlogin">
<?php if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
?><label for="username" class="hidden"><?php echo $langs->trans("Login"); ?></label><?php
} ?>
<?php if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
?><label for="username" class="hidden"><?php echo $langs->trans("Login"); ?></label><?php
} ?>
<!-- <span class="span-icon-user">-->
<span class="fa fa-user"></span>
<input type="text" id="username" maxlength="255" placeholder="<?php echo $langs->trans("Login"); ?>" name="username" class="flat input-icon-user minwidth150" value="<?php echo dol_escape_htmltag($login); ?>" tabindex="1" autofocus="autofocus" autocapitalize="off" autocomplete="on" spellcheck="false" autocorrect="off" />
</div>
</div>

<!-- Password -->
<?php if (!isset($conf->file->main_authentication) || $conf->file->main_authentication != 'googleoauth') { ?>
<div class="trinputlogin">
<div class="tagtd nowraponall center valignmiddle tdinputlogin">
<?php if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
Expand Down
2 changes: 1 addition & 1 deletion htdocs/imports/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@
$label = $objimport->array_import_label[$key];
print '<div class="twolinesmax-normallineheight minwidth200onall">';
print img_object($objimport->array_import_module[$key]['module']->getName(), $entityicon, 'class="pictofixedwidth"');
print dolPrintHtml($label);
print dolPrintHTML($label);
print '</div>';
print '</td><td style="text-align: right">';
if ($objimport->array_import_perms[$key]) {
Expand Down
4 changes: 3 additions & 1 deletion htdocs/modulebuilder/template/class/myobject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ public function create(User $user, $notrigger = 0)
{
$resultcreate = $this->createCommon($user, $notrigger);

//$resultvalidate = $this->validate($user, $notrigger);
// uncomment lines below if you want to validate object after creation
// $this->fetch($this->id); // needed to retrieve some fields (ie date_creation for masked ref)
// $resultcreate = $this->validate($user, $notrigger);

return $resultcreate;
}
Expand Down

0 comments on commit 2fcb00c

Please sign in to comment.