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

This commit is contained in:
Laurent Destailleur 2022-06-29 15:38:27 +02:00
commit 0299f18cec
7 changed files with 20 additions and 12 deletions

View File

@ -634,7 +634,7 @@ if (empty($reshook)) {
exit; exit;
} }
} else { } else {
$errmesg = $object->error; setEventMessages($object->error, null, 'errors');
} }
} }

View File

@ -84,7 +84,7 @@ if ($action == 'validate' && $user->rights->deplacement->creer) {
} }
} }
} elseif ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplacement->supprimer) { } elseif ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplacement->supprimer) {
$result = $object->delete($id); $result = $object->delete($user);
if ($result >= 0) { if ($result >= 0) {
header("Location: index.php"); header("Location: index.php");
exit; exit;

View File

@ -1,4 +1,6 @@
<?php <?php
use Stripe\ApiOperations\Delete;
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com>
@ -310,13 +312,15 @@ class Deplacement extends CommonObject
/** /**
* Delete record * Delete record
* *
* @param int $id Id of record to delete * @param User $user USer that Delete
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function delete($id) public function delete($user)
{ {
$this->db->begin(); $this->db->begin();
$id = $this->id;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."deplacement WHERE rowid = ".((int) $id); $sql = "DELETE FROM ".MAIN_DB_PREFIX."deplacement WHERE rowid = ".((int) $id);
dol_syslog(get_class($this)."::delete", LOG_DEBUG); dol_syslog(get_class($this)."::delete", LOG_DEBUG);

View File

@ -372,7 +372,7 @@ class EvalMath
/** /**
* Evaluate postfix notation * Evaluate postfix notation
* *
* @param string $tokens An array of expression to evaluate ('operators'). The operand are into ->stack. * @param array $tokens Expression
* @param array $vars Array * @param array $vars Array
* @return string Output * @return string Output
*/ */

View File

@ -4784,7 +4784,7 @@ class Form
* @param int $outputmode 0=HTML select string, 1=Array * @param int $outputmode 0=HTML select string, 1=Array
* @param int $include [=0] Removed or 1=Keep only * @param int $include [=0] Removed or 1=Keep only
* @param string $morecss More CSS * @param string $morecss More CSS
* @return string * @return string|array
* @see select_categories() * @see select_categories()
*/ */
public function select_all_categories($type, $selected = '', $htmlname = "parent", $maxlength = 64, $markafterid = 0, $outputmode = 0, $include = 0, $morecss = '') public function select_all_categories($type, $selected = '', $htmlname = "parent", $maxlength = 64, $markafterid = 0, $outputmode = 0, $include = 0, $morecss = '')

View File

@ -3091,7 +3091,10 @@ a.vsmenu:link, a.vsmenu:visited, a.vsmenu:hover, a.vsmenu:active, span.vsmenu {
margin: 1px 1px 1px 6px; margin: 1px 1px 1px 6px;
} }
span.vsmenudisabled, font.vsmenudisabled { span.vsmenudisabled, font.vsmenudisabled {
font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; color: #aaa; font-family: <?php print $fontlist ?>;
text-align: <?php print $left; ?>;
color: #aaa;
white-space: nowrap;
} }
a.vsmenu:link, a.vsmenu:visited { a.vsmenu:link, a.vsmenu:visited {
color: var(--colortextbackvmenu); color: var(--colortextbackvmenu);

View File

@ -3055,6 +3055,7 @@ span.vsmenudisabled, font.vsmenudisabled {
text-align: <?php print $left; ?>; text-align: <?php print $left; ?>;
font-weight: normal; font-weight: normal;
color: #aaa; color: #aaa;
white-space: nowrap;
} }
a.vsmenu:link, a.vsmenu:visited { a.vsmenu:link, a.vsmenu:visited {
color: var(--colortextbackvmenu); color: var(--colortextbackvmenu);
@ -7293,20 +7294,20 @@ div.clipboardCPValue.hidewithsize {
.a-mesure, .a-mesure-disabled { .a-mesure, .a-mesure-disabled {
text-align: center; text-align: center;
} }
.underbanner.underbanner-before-box { .underbanner.underbanner-before-box {
border-bottom: none; border-bottom: none;
} }
div.divButAction { div.divButAction {
margin-bottom: 0.5em; margin-bottom: 0.5em;
} }
div#card-errors { div#card-errors {
max-width: unset; max-width: unset;
} }
#dolpaymenttable { #dolpaymenttable {
padding: 5px; padding: 5px;
} }