2
0
forked from Wavyzz/dolibarr

add dolBuildUrl with examples of use (#35549)

* add dol_buildurl with examples of use

* add dol_buildurl with examples of use

* add dol_buildurl with examples of use

* add dol_buildurl with examples of use

* wip

* wip

* add more example

* add more example

* add more example

* add more example

* add more example

* add more example

* add more example

* add example

* add example

* add example

* add example

* add example

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* stay in the same area even we are on other area in other tab

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* add example

* add example

* add example

* add example

* add example

* add example

add example

add example

add example

add example

* add example

* add example

add example

add example

add example

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* fix

* wip

* wip

* clean code
This commit is contained in:
Frédéric FRANCE
2025-10-06 18:17:02 +02:00
committed by GitHub
parent 10deeef770
commit 2078610328
38 changed files with 558 additions and 484 deletions

View File

@@ -3890,11 +3890,11 @@ class Commande extends CommonOrder
$result = '';
if (isModEnabled("shipping") && ($option == '1' || $option == '2')) {
$url = DOL_URL_ROOT.'/expedition/shipment.php?id='.$this->id;
$baseurl = DOL_URL_ROOT . '/expedition/shipment.php';
} else {
$url = DOL_URL_ROOT.'/commande/card.php?id='.$this->id;
$baseurl = DOL_URL_ROOT . '/commande/card.php';
}
$query = ['id' => $this->id];
if (!$user->hasRight('commande', 'lire')) {
$option = 'nolink';
}
@@ -3906,9 +3906,10 @@ class Commande extends CommonOrder
$add_save_lastsearch_values = 1;
}
if ($add_save_lastsearch_values) {
$url .= '&save_lastsearch_values=1';
$query = array_merge($query, ['save_lastsearch_values' => 1]);
}
}
$url = dolBuildUrl($baseurl, $query);
if ($short) {
return $url;