Skip to content

Commit

Permalink
Merge branch 'develop' of [email protected]:Dolibarr/dolibarr.git into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
eldy committed Jun 9, 2024
2 parents 20bc8c3 + 7163299 commit 048f7e3
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 18 deletions.
2 changes: 1 addition & 1 deletion htdocs/barcode/codeinit.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@

$form = new Form($db);

llxHeader('', $langs->trans("MassBarcodeInit"));
llxHeader('', $langs->trans("MassBarcodeInit"), '', '', 0, 0, '', '', '', 'mod-barcode page-codeinit');

print load_fiche_titre($langs->trans("MassBarcodeInit"), '', 'title_setup.png');
print '<br>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/barcode/printsheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@

$form = new Form($db);

llxHeader('', $langs->trans("BarCodePrintsheet"));
llxHeader('', $langs->trans("BarCodePrintsheet"), '', '', 0, 0, '', '', '', 'mod-barcode page-printsheet');

print load_fiche_titre($langs->trans("BarCodePrintsheet"), '', 'barcode');
print '<br>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/blockedlog/admin/blockedlog.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
$title = $langs->trans("BlockedLogSetup");
$help_url="EN:Module_Unalterable_Archives_-_Logs|FR:Module_Archives_-_Logs_Inaltérable";

llxHeader('', $title, $help_url);
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-blockedlog page-admin_blockedlog');

$linkback = '';
if ($withtab) {
Expand Down
2 changes: 1 addition & 1 deletion htdocs/blockedlog/admin/blockedlog_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
}
$help_url = "EN:Module_Unalterable_Archives_-_Logs|FR:Module_Archives_-_Logs_Inaltérable";

llxHeader('', $title, $help_url);
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-blockedlog page-admin_blockedlog_list');

$MAXLINES = 10000;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/bookmarks/admin/bookmark.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
* View
*/

llxHeader();
llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-bookmarks page-admin_bookmark');

$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
print load_fiche_titre($langs->trans("BookmarkSetup"), $linkback, 'title_setup');
Expand Down
2 changes: 1 addition & 1 deletion htdocs/bookmarks/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
* View
*/

llxHeader();
llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-bookmarks page-card');

$form = new Form($db);

Expand Down
2 changes: 1 addition & 1 deletion htdocs/bookmarks/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
// Output page
// --------------------------------------------------------------------

llxHeader('', $title);
llxHeader('', $title, '', '', 0, 0, '', '', '', 'mod-bookmarks page-list');

$arrayofselected = is_array($toselect) ? $toselect : array();

Expand Down
2 changes: 1 addition & 1 deletion htdocs/commande/customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
* View
*/

llxHeader();
llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-commande page-customer');

$thirdpartystatic = new Societe($db);

Expand Down
2 changes: 1 addition & 1 deletion htdocs/commande/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
$formfile = new FormFile($db);
$help_url = "EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes";

llxHeader("", $langs->trans("Orders"), $help_url);
llxHeader('', $langs->trans("Orders"), $help_url, '', 0, 0, '', '', '', 'mod-commande page-index');


print load_fiche_titre($langs->trans("OrdersArea"), '', 'order');
Expand Down
2 changes: 1 addition & 1 deletion htdocs/commande/list_det.php
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@
exit;
}

llxHeader('', $title, $help_url);
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-commande page-list_det');

$param = '';

Expand Down
23 changes: 23 additions & 0 deletions htdocs/core/class/commonobject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -7213,6 +7213,29 @@ public function updateExtraField($key, $trigger = null, $userused = null)
}
}

/**
* Convenience method for retrieving the value of an extrafield without actually fetching it from the database.
*
* @param string $key Name of the extrafield
* @return mixed|null
*/
public function getExtraField($key)
{
return $this->array_options['options_'.$key] ?? null;
}

/**
* Convenience method for setting the value of an extrafield without actually updating it in the database.
*
* @param string $key Name of the extrafield
* @param mixed $value Value to be assigned to the extrafield
* @return void
*/
public function setExtraField($key, $value)
{
$this->array_options['options_'.$key] = $value;
}

/**
* Update an extra language value for the current object.
* Data to describe values to update are stored into $this->array_options=array('options_codeforfield1'=>'valueforfield1', 'options_codeforfield2'=>'valueforfield2', ...)
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/lib/functions.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -13804,7 +13804,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
'datestart' => $db->jdate($obj->dp),
'dateend' => $db->jdate($obj->dp2),
'note' => $obj->label,
'message' => $obj->message,
'message' => dol_htmlentitiesbr($obj->message),
'percent' => $obj->percent,

'userid' => $obj->user_id,
Expand Down Expand Up @@ -13834,7 +13834,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
'datestart' => $db->jdate($obj->dp),
'dateend' => $db->jdate($obj->dp2),
'note' => $obj->label,
'message' => $obj->message,
'message' => dol_htmlentitiesbr($obj->message),
'percent' => $obj->percent,
'acode' => $obj->acode,

Expand Down
1 change: 1 addition & 0 deletions htdocs/core/modules/import/import_xlsx.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,7 @@ public function import_insert($arrayrecord, $array_match_file_to_database, $obji
$data = array_combine($listfields, $listvalues);

$where = array(); // filters to forge SQL request
// @phpstan-ignore-next-line
'@phan-var string[] $where';
$filters = array(); // filters to forge output error message
foreach ($updatekeys as $key) {
Expand Down
2 changes: 1 addition & 1 deletion htdocs/delivery/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@

$title = $langs->trans('Delivery');

llxHeader('', $title, 'Livraison');
llxHeader('', $title, 'Livraison', '', 0, 0, '', '', '', 'mod-delivery page-card');

$form = new Form($db);
$formfile = new FormFile($db);
Expand Down
6 changes: 3 additions & 3 deletions htdocs/holiday/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@
$object->fetch($id);

// If status is waiting approval and approver is also user
if ($object->status == Holiday::STATUS_VALIDATED && $user->id == $object->fk_validator) {
if ($object->status == Holiday::STATUS_VALIDATED && ($user->id == $object->fk_validator || $cancreateall) && $user->hasRight('holiday', 'approve')) {
$object->oldcopy = dol_clone($object, 2);

$object->date_approval = dol_now();
Expand Down Expand Up @@ -711,7 +711,7 @@
$object->fetch($id);

// If status pending validation and validator = user
if ($object->status == Holiday::STATUS_VALIDATED && $user->id == $object->fk_validator) {
if ($object->status == Holiday::STATUS_VALIDATED && ($user->id == $object->fk_validator || $cancreateall) && $user->hasRight('holiday', 'approve')) {
$object->date_refuse = dol_now();
$object->fk_user_refuse = $user->id;
$object->statut = Holiday::STATUS_REFUSED;
Expand Down Expand Up @@ -1566,7 +1566,7 @@

if ($object->status == Holiday::STATUS_VALIDATED) { // If validated
// Button Approve / Refuse
if (($user->id == $object->fk_validator && $user->hasRight('holiday', 'approve')) || ($user->hasRight('holiday', 'writeall') && $user->hasRight('holiday', 'approve'))) {
if (($user->id == $object->fk_validator || $cancreateall) && $user->hasRight('holiday', 'approve')) {
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=valid&token='.newToken().'" class="butAction">'.$langs->trans("Approve").'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=refuse&token='.newToken().'" class="butAction">'.$langs->trans("ActionRefuseCP").'</a>';
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,6 @@ public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails
foreach ($tmparray as $key => $val) {
try {
$listlines->setVars($key, $val, true, 'UTF-8');
} catch (OdfException $e) {
dol_syslog($e->getMessage(), LOG_INFO);
} catch (SegmentException $e) {
dol_syslog($e->getMessage(), LOG_INFO);
}
Expand Down

0 comments on commit 048f7e3

Please sign in to comment.