add missing global

This commit is contained in:
Frédéric FRANCE 2022-02-15 18:14:44 +01:00
parent d546e11fba
commit 0ba912b1e5
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
15 changed files with 33 additions and 17 deletions

View File

@ -2164,7 +2164,7 @@ class Adherent extends CommonObject
*/
public function getNomUrl($withpictoimg = 0, $maxlen = 0, $option = 'card', $mode = '', $morecss = '', $save_lastsearch_value = -1, $notooltip = 0, $addlinktonotes = 0)
{
global $conf, $langs;
global $conf, $langs, $hookmanager;
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpictoimg) {
$withpictoimg = 0;

View File

@ -305,7 +305,7 @@ class Asset extends CommonObject
*/
public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
{
global $db, $conf, $langs;
global $db, $conf, $langs, $hookmanager;
global $dolibarr_main_authentication, $dolibarr_main_demo;
global $menumanager;

View File

@ -1612,7 +1612,7 @@ class Categorie extends CommonObject
*/
public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0, $moreparam = '')
{
global $langs;
global $langs, $hookmanager;
$result = '';
$label = $langs->trans("ShowCategory").': '.($this->ref ? $this->ref : $this->label);

View File

@ -3569,7 +3569,7 @@ class Propal extends CommonObject
*/
public function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notooltip = 0, $save_lastsearch_value = -1, $addlinktonotes = -1)
{
global $langs, $conf, $user;
global $langs, $conf, $user, $hookmanager;
if (!empty($conf->dol_no_mouse_hover)) {
$notooltip = 1; // Force disable tooltips

View File

@ -3663,7 +3663,7 @@ class Commande extends CommonOrder
*/
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $notooltip = 0, $save_lastsearch_value = -1, $addlinktonotes = 0)
{
global $conf, $langs, $user;
global $conf, $langs, $user, $hookmanager;
if (!empty($conf->dol_no_mouse_hover)) {
$notooltip = 1; // Force disable tooltips

View File

@ -1388,7 +1388,7 @@ class FactureRec extends CommonInvoice
*/
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = '', $save_lastsearch_value = -1)
{
global $langs;
global $langs, $hookmanager;
$result = '';

View File

@ -560,7 +560,7 @@ class ChargeSociales extends CommonObject
*/
public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $short = 0, $save_lastsearch_value = -1)
{
global $langs, $conf, $user, $form;
global $langs, $conf, $user, $form, $hookmanager;
if (!empty($conf->dol_no_mouse_hover)) {
$notooltip = 1; // Force disable tooltips

View File

@ -913,7 +913,7 @@ class Don extends CommonObject
*/
public function getNomUrl($withpicto = 0, $notooltip = 0, $moretitle = '', $save_lastsearch_value = -1)
{
global $conf, $langs;
global $conf, $langs, $hookmanager;
if (!empty($conf->dol_no_mouse_hover)) {
$notooltip = 1; // Force disable tooltips

View File

@ -1778,7 +1778,7 @@ class Expedition extends CommonObject
*/
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $notooltip = 0, $save_lastsearch_value = -1)
{
global $langs, $conf;
global $langs, $conf, $hookmanager;
$result = '';
$label = '<u>'.$langs->trans("Shipment").'</u>';

View File

@ -628,7 +628,7 @@ class FichinterRec extends Fichinter
*/
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '')
{
global $langs;
global $langs, $hookmanager;
$result = '';
$label = $langs->trans("ShowInterventionModel").': '.$this->ref;

View File

@ -791,7 +791,7 @@ class CommandeFournisseur extends CommonOrder
*/
public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $save_lastsearch_value = -1, $addlinktonotes = 0)
{
global $langs, $conf, $user;
global $langs, $conf, $user, $hookmanager;
$result = '';

View File

@ -1377,7 +1377,7 @@ class FactureFournisseurRec extends CommonInvoice
*/
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = '', $save_lastsearch_value = -1)
{
global $langs;
global $langs, $hookmanager;
$result = '';
@ -1429,7 +1429,15 @@ class FactureFournisseurRec extends CommonInvoice
$result .= $this->ref;
}
$result .= $linkend;
global $action;
$hookmanager->initHooks(array($this->element . 'dao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
} else {
$result .= $hookmanager->resPrint;
}
return $result;
}

View File

@ -2696,7 +2696,7 @@ class FactureFournisseur extends CommonInvoice
*/
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1, $addlinktonotes = 0)
{
global $langs, $conf, $user;
global $langs, $conf, $user, $hookmanager;
$result = '';

View File

@ -1270,7 +1270,7 @@ class Holiday extends CommonObject
*/
public function getNomUrl($withpicto = 0, $save_lastsearch_value = -1, $notooltip = 0)
{
global $langs;
global $langs, $hookmanager;
$result = '';
@ -1305,7 +1305,15 @@ class Holiday extends CommonObject
$result .= $this->ref;
}
$result .= $linkend;
global $action;
$hookmanager->initHooks(array($this->element . 'dao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
} else {
$result .= $hookmanager->resPrint;
}
return $result;
}

View File

@ -2470,7 +2470,7 @@ class SupplierProposal extends CommonObject
*/
public function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notooltip = 0, $save_lastsearch_value = -1, $addlinktonotes = 0)
{
global $langs, $conf, $user;
global $langs, $conf, $user, $hookmanager;
if (!empty($conf->dol_no_mouse_hover)) {
$notooltip = 1; // Force disable tooltips