Update sendings.lib.php

delivery_prepare_head 
complete_head_from_modules object->id 
but the good one is $object->origin_id
so we temporary change it
This commit is contained in:
BENKE Charles 2013-03-11 21:01:04 +01:00
parent ce72fa7681
commit 425ed19e20

View File

@ -108,11 +108,14 @@ function delivery_prepare_head($object)
// Show more tabs from modules // Show more tabs from modules
// Entries must be declared in modules descriptor with line // 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: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');
complete_head_from_modules($conf,$langs,$object,$head,$h,'delivery','remove'); complete_head_from_modules($conf,$langs,$object,$head,$h,'delivery','remove');
$object->id = $tmpObjectId;
return $head; return $head;
} }