Quellcode durchsuchen

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

Laurent Destailleur vor 2 Jahren
Ursprung
Commit
9e0c822512
2 geänderte Dateien mit 20 neuen und 2 gelöschten Zeilen
  1. 7 1
      htdocs/core/class/html.form.class.php
  2. 13 1
      htdocs/ticket/class/ticket.class.php

+ 7 - 1
htdocs/core/class/html.form.class.php

@@ -7731,7 +7731,13 @@ class Form
 		}
 
 		// Add where from hooks
-		$parameters = array();
+		$parameters = array(
+			'object' => $objecttmp,
+			'htmlname' => $htmlname,
+			'filter' => $filter,
+			'searchkey' => $searchkey
+		);
+
 		$reshook = $hookmanager->executeHooks('selectForFormsListWhere', $parameters); // Note that $action and $object may have been modified by hook
 		if (!empty($hookmanager->resPrint)) {
 			$sql .= $hookmanager->resPrint;

+ 13 - 1
htdocs/ticket/class/ticket.class.php

@@ -1319,7 +1319,7 @@ class Ticket extends CommonObject
 	public function LibStatut($status, $mode = 0, $notooltip = 0, $progress = 0)
 	{
 		// phpcs:enable
-		global $langs;
+		global $langs, $hookmanager;
 
 		$labelStatus = $this->statuts[$status];
 		$labelStatusShort = $this->statuts_short[$status];
@@ -1347,6 +1347,18 @@ class Ticket extends CommonObject
 			$mode = 0;
 		}
 
+		$parameters = array(
+			'status'          => $status,
+			'mode'            => $mode,
+		);
+
+		// Note that $action and $object may have been modified by hook
+		$reshook = $hookmanager->executeHooks('LibStatut', $parameters, $this);
+
+		if ($reshook > 0) {
+			return $hookmanager->resPrint;
+		}
+
 		$params = array();
 		if ($notooltip) {
 			$params = array('tooltip' => 'no');