Skip to content

Commit

Permalink
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
eldy committed May 17, 2024
2 parents 5172f65 + f080077 commit e5ce140
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 1 deletion.
3 changes: 3 additions & 0 deletions htdocs/core/ajax/selectsearchbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@
if (((isModEnabled('fournisseur') && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled('supplier_order') && $user->hasRight('supplier_order', 'lire'))) && !getDolGlobalString('MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED')) {
$arrayresult['searchintosupplierorder'] = array('position' => 110, 'img' => 'object_supplier_order', 'label' => $langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text' => img_picto('', 'object_supplier_order', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url' => DOL_URL_ROOT.'/fourn/commande/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
}
if (isModEnabled('reception') && !getDolGlobalString('MAIN_SEARCHFORM_SUPPLIER_RECEPTION_DISABLED') && $user->hasRight('reception', 'lire')) {
$arrayresult['searchintoreception'] = array('position'=>115, 'img'=>'object_reception', 'label'=>$langs->trans("SearchIntoSupplierReceptions", $search_boxvalue), 'text'=>img_picto('', 'object_reception', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierReceptions", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/reception/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
}
if (((isModEnabled('fournisseur') && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'facture', 'lire')) || (isModEnabled('supplier_invoice') && $user->hasRight('supplier_invoice', 'lire'))) && !getDolGlobalString('MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED')) {
$arrayresult['searchintosupplierinvoice'] = array('position' => 120, 'img' => 'object_supplier_invoice', 'label' => $langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text' => img_picto('', 'object_supplier_invoice', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url' => DOL_URL_ROOT.'/fourn/facture/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/class/commonobject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -8945,7 +8945,7 @@ public function showOptionals($extrafields, $mode = 'view', $params = null, $key
$out .= $extrafields->showOutputField($key, $value, '', $this->table_element);
break;
case "create":
$out .= $extrafields->showInputField($key, $value, '', $keysuffix, '', 0, $this->id, $this->table_element);
$out .= getPictoForType($extrafields->attributes[$this->table_element]['type'][$key]) . $extrafields->showInputField($key, $value, '', $keysuffix, '', 0, $this->id, $this->table_element);
break;
case "edit":
$out .= $extrafields->showInputField($key, $value, '', $keysuffix, '', 0, $this->id, $this->table_element);
Expand Down
1 change: 1 addition & 0 deletions htdocs/langs/en_US/main.lang
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,7 @@ SearchIntoSupplierProposals=Vendor proposals
SearchIntoInterventions=Interventions
SearchIntoContracts=Contracts
SearchIntoCustomerShipments=Customer shipments
SearchIntoSupplierReceptions=Vendor receptions
SearchIntoExpenseReports=Expense reports
SearchIntoLeaves=Leave
SearchIntoKM=Knowledge base
Expand Down
1 change: 1 addition & 0 deletions htdocs/reception/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array(
'e.ref' => "Ref",
'e.ref_supplier'=>"RefSupplier",
's.nom' => "ThirdParty",
'e.note_public' => 'NotePublic',
);
Expand Down
6 changes: 6 additions & 0 deletions htdocs/ticket/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
// Store current page url
$url_page_current = DOL_URL_ROOT.'/ticket/contact.php';

$hookmanager->initHooks(array('contactticketcard', 'globalcard'));
$object = new Ticket($db);

// Security check
Expand All @@ -84,6 +85,11 @@
/*
* Actions
*/
$parameters = array();
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
}

if ($action == 'addcontact' && $user->hasRight('ticket', 'write')) {
$result = $object->fetch($id, '', $track_id);
Expand Down
7 changes: 7 additions & 0 deletions htdocs/ticket/document.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
$sortfield = "position_name";
}

$hookmanager->initHooks(array('documentticketcard', 'globalcard'));
$object = new Ticket($db);
$result = $object->fetch($id, $ref, $track_id);

Expand Down Expand Up @@ -100,6 +101,12 @@

include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';

$parameters = array();
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
}

// Set parent company
if ($action == 'set_thirdparty' && $user->hasRight('ticket', 'write')) {
if ($object->fetch(GETPOSTINT('id'), '', GETPOST('track_id', 'alpha')) >= 0) {
Expand Down

0 comments on commit e5ce140

Please sign in to comment.