Merge branch 'hookgetnomurl' into patch-1

This commit is contained in:
Frédéric FRANCE 2022-02-15 18:44:06 +01:00
commit a613553f37
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
50 changed files with 195 additions and 52 deletions

View File

@ -476,7 +476,7 @@ class AccountingAccount extends CommonObject
*/ */
public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1, $withcompletelabel = 0, $option = '') public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1, $withcompletelabel = 0, $option = '')
{ {
global $langs, $conf; global $langs, $conf, $hookmanager;
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
if (!empty($conf->dol_no_mouse_hover)) { if (!empty($conf->dol_no_mouse_hover)) {
@ -561,6 +561,15 @@ class AccountingAccount extends CommonObject
if ($withpicto != 2) { if ($withpicto != 2) {
$result .= $linkstart . $label_link . $linkend; $result .= $linkstart . $label_link . $linkend;
} }
global $action;
$hookmanager->initHooks(array('accountingaccountdao'));
$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; return $result;
} }

View File

@ -221,7 +221,7 @@ class AccountingJournal extends CommonObject
*/ */
public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0) public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0)
{ {
global $langs, $conf, $user; global $langs, $conf, $user, $hookmanager;
if (!empty($conf->dol_no_mouse_hover)) { if (!empty($conf->dol_no_mouse_hover)) {
$notooltip = 1; // Force disable tooltips $notooltip = 1; // Force disable tooltips
@ -276,6 +276,15 @@ class AccountingJournal extends CommonObject
} }
$result .= $linkend; $result .= $linkend;
global $action;
$hookmanager->initHooks(array('accountingjournaldao'));
$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; return $result;
} }

View File

@ -460,7 +460,7 @@ class BookKeeping extends CommonObject
{ {
global $db, $conf, $langs; global $db, $conf, $langs;
global $dolibarr_main_authentication, $dolibarr_main_demo; global $dolibarr_main_authentication, $dolibarr_main_demo;
global $menumanager; global $menumanager, $hookmanager;
if (!empty($conf->dol_no_mouse_hover)) { if (!empty($conf->dol_no_mouse_hover)) {
$notooltip = 1; // Force disable tooltips $notooltip = 1; // Force disable tooltips
@ -512,6 +512,15 @@ class BookKeeping extends CommonObject
$result .= $linkend; $result .= $linkend;
//if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : '');
global $action;
$hookmanager->initHooks(array('bookkeepingdao'));
$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; return $result;
} }

View File

@ -307,7 +307,7 @@ class Asset extends CommonObject
{ {
global $db, $conf, $langs, $hookmanager; global $db, $conf, $langs, $hookmanager;
global $dolibarr_main_authentication, $dolibarr_main_demo; global $dolibarr_main_authentication, $dolibarr_main_demo;
global $menumanager; global $menumanager, $hookmanager;
if (!empty($conf->dol_no_mouse_hover)) { if (!empty($conf->dol_no_mouse_hover)) {
$notooltip = 1; // Force disable tooltips $notooltip = 1; // Force disable tooltips
@ -360,8 +360,14 @@ class Asset extends CommonObject
} }
$result .= $linkend; $result .= $linkend;
//if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : '');
<<<<<<< HEAD
global $action; global $action;
$hookmanager->initHooks(array($this->element . 'dao')); $hookmanager->initHooks(array($this->element . 'dao'));
=======
global $action;
$hookmanager->initHooks(array('assetdao'));
>>>>>>> hookgetnomurl
$parameters = array('id'=>$this->id, 'getnomurl' => &$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {

View File

@ -847,7 +847,7 @@ class BOM extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('bomdao')); $hookmanager->initHooks(array('bomdao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;
@ -1467,7 +1467,7 @@ class BOMLine extends CommonObjectLine
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('bomlinedao')); $hookmanager->initHooks(array('bomlinedao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -344,7 +344,7 @@ class Bookmark extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('mybookmarkdao')); $hookmanager->initHooks(array('mybookmarkdao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -721,7 +721,7 @@ class PaymentVarious extends CommonObject
global $action; global $action;
$hookmanager->initHooks(array('variouspayment')); $hookmanager->initHooks(array('variouspayment'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -466,7 +466,7 @@ class CashControl extends CommonObject
global $action; global $action;
$hookmanager->initHooks(array('cashfencedao')); $hookmanager->initHooks(array('cashfencedao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -1569,7 +1569,7 @@ class Facture extends CommonInvoice
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('invoicedao')); $hookmanager->initHooks(array('invoicedao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result, 'notooltip' => $notooltip, 'addlinktonotes' => $addlinktonotes, 'save_lastsearch_value'=> $save_lastsearch_value, 'target' => $target); $parameters = array('id'=>$this->id, 'getnomurl' => &$result, 'notooltip' => $notooltip, 'addlinktonotes' => $addlinktonotes, 'save_lastsearch_value'=> $save_lastsearch_value, 'target' => $target);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -1260,7 +1260,7 @@ class BonPrelevement extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('banktransferdao')); $hookmanager->initHooks(array('banktransferdao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -725,7 +725,7 @@ class Delivery extends CommonObject
*/ */
public function getNomUrl($withpicto = 0, $save_lastsearch_value = -1) public function getNomUrl($withpicto = 0, $save_lastsearch_value = -1)
{ {
global $langs; global $langs, $hookmanager;
$result = ''; $result = '';
@ -757,6 +757,16 @@ class Delivery extends CommonObject
$result .= ' '; $result .= ' ';
} }
$result .= $linkstart.$this->ref.$linkend; $result .= $linkstart.$this->ref.$linkend;
global $action;
$hookmanager->initHooks(array('deliverydao'));
$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; return $result;
} }

View File

@ -955,7 +955,7 @@ class Don extends CommonObject
$result .= $linkend; $result .= $linkend;
global $action; global $action;
$hookmanager->initHooks(array($this->element . 'dao')); $hookmanager->initHooks(array($this->element . 'dao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -661,7 +661,7 @@ class PaymentDonation extends CommonObject
*/ */
public function getNomUrl($withpicto = 0, $maxlen = 0) public function getNomUrl($withpicto = 0, $maxlen = 0)
{ {
global $langs; global $langs, $hookmanager;
$result = ''; $result = '';
@ -684,6 +684,15 @@ class PaymentDonation extends CommonObject
} }
} }
global $action;
$hookmanager->initHooks(array('paymentdonationdao'));
$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; return $result;
} }
} }

View File

@ -474,7 +474,7 @@ class EcmDirectory extends CommonObject
*/ */
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $more = '', $notooltip = 0) public function getNomUrl($withpicto = 0, $option = '', $max = 0, $more = '', $notooltip = 0)
{ {
global $langs; global $langs, $hookmanager;
$result = ''; $result = '';
//$newref=str_replace('_',' ',$this->ref); //$newref=str_replace('_',' ',$this->ref);
@ -506,6 +506,15 @@ class EcmDirectory extends CommonObject
} }
$result .= $linkend; $result .= $linkend;
global $action;
$hookmanager->initHooks(array('ecmdirectorydao'));
$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; return $result;
} }

View File

@ -831,7 +831,7 @@ class EcmFiles extends CommonObject
{ {
global $db, $conf, $langs; global $db, $conf, $langs;
global $dolibarr_main_authentication, $dolibarr_main_demo; global $dolibarr_main_authentication, $dolibarr_main_demo;
global $menumanager; global $menumanager, $hookmanager;
if (!empty($conf->dol_no_mouse_hover)) { if (!empty($conf->dol_no_mouse_hover)) {
$notooltip = 1; // Force disable tooltips $notooltip = 1; // Force disable tooltips
@ -868,6 +868,16 @@ class EcmFiles extends CommonObject
} }
} }
$result .= $linkstart.$this->ref.$linkend; $result .= $linkstart.$this->ref.$linkend;
global $action;
$hookmanager->initHooks(array('ecmfilesdao'));
$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; return $result;
} }

View File

@ -563,7 +563,7 @@ class EmailCollector extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('emailcollectordao')); $hookmanager->initHooks(array('emailcollectordao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -389,7 +389,7 @@ class EmailCollectorAction extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('emailcollectoractiondao')); $hookmanager->initHooks(array('emailcollectoractiondao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -363,7 +363,7 @@ class EmailCollectorFilter extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('emailcollectorfilterdao')); $hookmanager->initHooks(array('emailcollectorfilterdao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -602,7 +602,7 @@ class ConferenceOrBooth extends ActionComm
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('conferenceorboothdao')); $hookmanager->initHooks(array('conferenceorboothdao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -855,7 +855,7 @@ class ConferenceOrBoothAttendee extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('conferenceorboothattendeedao')); $hookmanager->initHooks(array('conferenceorboothattendeedao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -1640,7 +1640,7 @@ class ExpenseReport extends CommonObject
*/ */
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1) public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1)
{ {
global $langs, $conf; global $langs, $conf, $hookmanager;
$result = ''; $result = '';
@ -1709,6 +1709,15 @@ class ExpenseReport extends CommonObject
} }
$result .= $linkend; $result .= $linkend;
global $action;
$hookmanager->initHooks(array('expensereportdao'));
$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; return $result;
} }

View File

@ -628,7 +628,7 @@ class PaymentExpenseReport extends CommonObject
*/ */
public function getNomUrl($withpicto = 0, $maxlen = 0) public function getNomUrl($withpicto = 0, $maxlen = 0)
{ {
global $langs; global $langs, $hookmanager;
$result = ''; $result = '';
@ -660,7 +660,15 @@ class PaymentExpenseReport extends CommonObject
$result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend; $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend;
} }
} }
global $action;
$hookmanager->initHooks(array('paymentexpensereportdao'));
$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; return $result;
} }

View File

@ -816,7 +816,7 @@ class Fichinter extends CommonObject
global $action; global $action;
$hookmanager->initHooks(array('interventiondao')); $hookmanager->initHooks(array('interventiondao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -875,7 +875,7 @@ class CommandeFournisseur extends CommonOrder
global $action; global $action;
$hookmanager->initHooks(array($this->element . 'dao')); $hookmanager->initHooks(array($this->element . 'dao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -2816,7 +2816,7 @@ class FactureFournisseur extends CommonInvoice
} }
global $action; global $action;
$hookmanager->initHooks(array($this->element . 'dao')); $hookmanager->initHooks(array($this->element . 'dao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -1092,7 +1092,7 @@ class ProductFournisseur extends Product
*/ */
public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
{ {
global $db, $conf, $langs; global $db, $conf, $langs, $hookmanager;
if (!empty($conf->dol_no_mouse_hover)) { if (!empty($conf->dol_no_mouse_hover)) {
$notooltip = 1; // Force disable tooltips $notooltip = 1; // Force disable tooltips
@ -1227,6 +1227,15 @@ class ProductFournisseur extends Product
$result .= $linkend; $result .= $linkend;
//if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : '');
global $action;
$hookmanager->initHooks(array('supplierproductdao'));
$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; return $result;
} }

View File

@ -594,7 +594,7 @@ class PaiementFourn extends Paiement
*/ */
public function getNomUrl($withpicto = 0, $option = '', $mode = 'withlistofinvoices', $notooltip = 0, $morecss = '') public function getNomUrl($withpicto = 0, $option = '', $mode = 'withlistofinvoices', $notooltip = 0, $morecss = '')
{ {
global $langs; global $langs, $conf, $hookmanager;
$result = ''; $result = '';
@ -639,6 +639,15 @@ class PaiementFourn extends Paiement
} }
$result .= $linkend; $result .= $linkend;
global $action;
$hookmanager->initHooks(array('supplierpaymentdao'));
$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; return $result;
} }

View File

@ -1307,7 +1307,7 @@ class Holiday extends CommonObject
$result .= $linkend; $result .= $linkend;
global $action; global $action;
$hookmanager->initHooks(array($this->element . 'dao')); $hookmanager->initHooks(array($this->element . 'dao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -506,7 +506,7 @@ class Establishment extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('establishmentdao')); $hookmanager->initHooks(array('establishmentdao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -808,7 +808,7 @@ class Evaluation extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('evaluationdao')); $hookmanager->initHooks(array('evaluationdao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -780,7 +780,7 @@ class Evaluationline extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('evaluationlinedao')); $hookmanager->initHooks(array('evaluationlinedao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -814,7 +814,7 @@ class Job extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('jobdao')); $hookmanager->initHooks(array('jobdao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -854,7 +854,7 @@ class Skill extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('jobdao')); $hookmanager->initHooks(array('jobdao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -768,7 +768,7 @@ class Skilldet extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('skilldetdao')); $hookmanager->initHooks(array('skilldetdao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -807,7 +807,7 @@ class SkillRank extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('skillrankdao')); $hookmanager->initHooks(array('skillrankdao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -556,7 +556,7 @@ class Loan extends CommonObject
*/ */
public function getNomUrl($withpicto = 0, $maxlen = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) public function getNomUrl($withpicto = 0, $maxlen = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
{ {
global $conf, $langs; global $conf, $langs, $hookmanager;
$result = ''; $result = '';
@ -606,6 +606,15 @@ class Loan extends CommonObject
} }
$result .= $linkend; $result .= $linkend;
global $action;
$hookmanager->initHooks(array('loandao'));
$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; return $result;
} }

View File

@ -617,7 +617,7 @@ class PaymentLoan extends CommonObject
*/ */
public function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $moretitle = '', $save_lastsearch_value = -1) public function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $moretitle = '', $save_lastsearch_value = -1)
{ {
global $langs, $conf; global $langs, $conf, $hookmanager;
if (!empty($conf->dol_no_mouse_hover)) { if (!empty($conf->dol_no_mouse_hover)) {
$notooltip = 1; // Force disable tooltips $notooltip = 1; // Force disable tooltips
@ -654,6 +654,15 @@ class PaymentLoan extends CommonObject
} }
$result .= $linkend; $result .= $linkend;
global $action;
$hookmanager->initHooks(array('loanpaymentdao'));
$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; return $result;
} }
} }

View File

@ -1045,7 +1045,7 @@ class Partnership extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('partnershipdao')); $hookmanager->initHooks(array('partnershipdao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -434,7 +434,7 @@ class PartnershipType extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('myobjectdao')); $hookmanager->initHooks(array('myobjectdao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -760,7 +760,7 @@ class Entrepot extends CommonObject
global $action; global $action;
$hookmanager->initHooks(array('warehousedao')); $hookmanager->initHooks(array('warehousedao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result, 'withpicto' => $withpicto, 'option' => $option, 'showfullpath' => $showfullpath, 'notooltip'=> $notooltip); $parameters = array('id'=>$this->id, 'getnomurl' => &$result, 'withpicto' => $withpicto, 'option' => $option, 'showfullpath' => $showfullpath, 'notooltip'=> $notooltip);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -1264,7 +1264,7 @@ class Project extends CommonObject
global $action; global $action;
$hookmanager->initHooks(array('projectdao')); $hookmanager->initHooks(array('projectdao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -1115,7 +1115,7 @@ class Reception extends CommonObject
*/ */
public function getNomUrl($withpicto = 0, $option = 0, $max = 0, $short = 0, $notooltip = 0) public function getNomUrl($withpicto = 0, $option = 0, $max = 0, $short = 0, $notooltip = 0)
{ {
global $conf, $langs; global $conf, $langs, $hookmanager;
$result = ''; $result = '';
$label = img_picto('', $this->picto).' <u>'.$langs->trans("Reception").'</u>'; $label = img_picto('', $this->picto).' <u>'.$langs->trans("Reception").'</u>';
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref; $label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
@ -1148,6 +1148,16 @@ class Reception extends CommonObject
$result .= ' '; $result .= ' ';
} }
$result .= $linkstart.$this->ref.$linkend; $result .= $linkstart.$this->ref.$linkend;
global $action;
$hookmanager->initHooks(array('receptiondao'));
$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; return $result;
} }

View File

@ -762,7 +762,7 @@ class RecruitmentCandidature extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('recruitmentcandidaturedao')); $hookmanager->initHooks(array('recruitmentcandidaturedao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -863,7 +863,7 @@ class RecruitmentJobPosition extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('recruitmentjobpositiondao')); $hookmanager->initHooks(array('recruitmentjobpositiondao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -933,7 +933,7 @@ class Dolresource extends CommonObject
*/ */
public function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) public function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
{ {
global $conf, $langs; global $conf, $langs, $hookmanager;
$result = ''; $result = '';
$label = img_picto('', $this->picto).' <u>'.$langs->trans("Resource").'</u>'; $label = img_picto('', $this->picto).' <u>'.$langs->trans("Resource").'</u>';
@ -986,6 +986,15 @@ class Dolresource extends CommonObject
} }
$result .= $linkend; $result .= $linkend;
global $action;
$hookmanager->initHooks(array('dolresourcedao'));
$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; return $result;
} }

View File

@ -550,7 +550,7 @@ class Salary extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('salarypayment')); $hookmanager->initHooks(array('salarypayment'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $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; if ($reshook > 0) $result = $hookmanager->resPrint;
else $result .= $hookmanager->resPrint; else $result .= $hookmanager->resPrint;

View File

@ -2733,7 +2733,7 @@ class Societe extends CommonObject
$hookmanager->initHooks(array('thirdpartydao')); $hookmanager->initHooks(array('thirdpartydao'));
$parameters = array( $parameters = array(
'id'=>$this->id, 'id'=>$this->id,
'getnomurl'=>$result, 'getnomurl' => &$result,
'withpicto '=> $withpicto, 'withpicto '=> $withpicto,
'option'=> $option, 'option'=> $option,
'maxlen'=> $maxlen, 'maxlen'=> $maxlen,

View File

@ -709,7 +709,7 @@ class CTicketCategory extends CommonObject
global $action, $hookmanager; global $action, $hookmanager;
$hookmanager->initHooks(array('cticketcategorydao')); $hookmanager->initHooks(array('cticketcategorydao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -2756,7 +2756,7 @@ class User extends CommonObject
global $action; global $action;
$hookmanager->initHooks(array('userdao')); $hookmanager->initHooks(array('userdao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;

View File

@ -785,7 +785,7 @@ class UserGroup extends CommonObject
global $action; global $action;
$hookmanager->initHooks(array('groupdao')); $hookmanager->initHooks(array('groupdao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result); $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 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) { if ($reshook > 0) {
$result = $hookmanager->resPrint; $result = $hookmanager->resPrint;