From 425ed19e209bce55ce8ce992ca5cebbd2d3f699d Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Mon, 11 Mar 2013 21:01:04 +0100 Subject: [PATCH] Update sendings.lib.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit delivery_prepare_head complete_head_from_modules object->id but the good one isĀ $object->origin_id so we temporary change it --- htdocs/core/lib/sendings.lib.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index 5a0ce136ca3..78fd0b9f0e0 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -108,11 +108,14 @@ function delivery_prepare_head($object) // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab - // $this->tabs = array('entity:-tabname); to remove a tab + // $this->tabs = array('entity:-tabname); to remove a tab + // complete_head_from_modules use $object->id for this link so we temporary change it + $tmpObjectId = $object->id; + $object->id = $object->origin_id; complete_head_from_modules($conf,$langs,$object,$head,$h,'delivery'); complete_head_from_modules($conf,$langs,$object,$head,$h,'delivery','remove'); - + $object->id = $tmpObjectId; return $head; } @@ -322,4 +325,4 @@ function show_list_sending_receive($origin,$origin_id,$filter='') return 1; } -?> \ No newline at end of file +?>