Fix: add DOL_URL_ROOT in extra tabs

This commit is contained in:
Laurent Destailleur 2010-01-21 20:56:22 +00:00
parent 8e3776a290
commit 58e1c4b2db
10 changed files with 26 additions and 26 deletions

View File

@ -124,7 +124,7 @@ function societe_prepare_head($objsoc)
// 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:MyModule:@mymodule:/dolibarr/mymodule/mypage.php?id=__ID__'); // $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
if (is_array($conf->tabs_modules['thirdparty'])) if (is_array($conf->tabs_modules['thirdparty']))
{ {
$i=0; $i=0;

View File

@ -57,7 +57,7 @@ function contract_prepare_head($contrat)
// 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:MyModule:@mymodule:/dolibarr/mymodule/mypage.php?id=__ID__'); // $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
if (is_array($conf->tabs_modules['contract'])) if (is_array($conf->tabs_modules['contract']))
{ {
$i=0; $i=0;
@ -65,7 +65,7 @@ function contract_prepare_head($contrat)
{ {
$values=explode(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = preg_replace('/__ID__/i',$contrat->id,$values[3]); $head[$h][0] = DOL_URL_ROOT . preg_replace('/__ID__/i',$contrat->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);
$head[$h][2] = 'tab'.$values[1]; $head[$h][2] = 'tab'.$values[1];
$h++; $h++;

View File

@ -70,7 +70,7 @@ function fichinter_prepare_head($fichinter)
// 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:MyModule:@mymodule:/dolibarr/mymodule/mypage.php?id=__ID__'); // $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
if (is_array($conf->tabs_modules['intervention'])) if (is_array($conf->tabs_modules['intervention']))
{ {
$i=0; $i=0;
@ -78,7 +78,7 @@ function fichinter_prepare_head($fichinter)
{ {
$values=explode(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = preg_replace('/__ID__/i',$fichinter->id,$values[3]); $head[$h][0] = DOL_URL_ROOT . preg_replace('/__ID__/i',$fichinter->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);
$head[$h][2] = 'tab'.$values[1]; $head[$h][2] = 'tab'.$values[1];
$h++; $h++;

View File

@ -61,7 +61,7 @@ function facturefourn_prepare_head($fac)
// 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:MyModule:@mymodule:/dolibarr/mymodule/mypage.php?id=__ID__'); // $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
if (is_array($conf->tabs_modules['supplier_invoice'])) if (is_array($conf->tabs_modules['supplier_invoice']))
{ {
$i=0; $i=0;
@ -69,7 +69,7 @@ function facturefourn_prepare_head($fac)
{ {
$values=explode(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = preg_replace('/__ID__/i',$fac->id,$values[3]); $head[$h][0] = DOL_URL_ROOT . preg_replace('/__ID__/i',$fac->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);
$head[$h][2] = 'tab'.$values[1]; $head[$h][2] = 'tab'.$values[1];
$h++; $h++;
@ -126,7 +126,7 @@ function ordersupplier_prepare_head($commande)
// 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:MyModule:@mymodule:/dolibarr/mymodule/mypage.php?id=__ID__'); // $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
if (is_array($conf->tabs_modules['supplier_order'])) if (is_array($conf->tabs_modules['supplier_order']))
{ {
$i=0; $i=0;
@ -134,7 +134,7 @@ function ordersupplier_prepare_head($commande)
{ {
$values=explode(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = preg_replace('/__ID__/i',$commande->id,$values[3]); $head[$h][0] = DOL_URL_ROOT . preg_replace('/__ID__/i',$commande->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);
$head[$h][2] = 'tab'.$values[1]; $head[$h][2] = 'tab'.$values[1];
$h++; $h++;

View File

@ -79,7 +79,7 @@ function facture_prepare_head($fac)
// 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:MyModule:@mymodule:/dolibarr/mymodule/mypage.php?id=__ID__'); // $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
if (is_array($conf->tabs_modules['invoice'])) if (is_array($conf->tabs_modules['invoice']))
{ {
$i=0; $i=0;
@ -87,7 +87,7 @@ function facture_prepare_head($fac)
{ {
$values=explode(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = preg_replace('/__ID__/i',$fac->id,$values[3]); $head[$h][0] = DOL_URL_ROOT . preg_replace('/__ID__/i',$fac->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);
$head[$h][2] = 'tab'.$values[1]; $head[$h][2] = 'tab'.$values[1];
$h++; $h++;

View File

@ -67,7 +67,7 @@ function member_prepare_head($member)
// 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:MyModule:@mymodule:/dolibarr/mymodule/mypage.php?id=__ID__'); // $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
if (is_array($conf->tabs_modules['member'])) if (is_array($conf->tabs_modules['member']))
{ {
$i=0; $i=0;
@ -75,7 +75,7 @@ function member_prepare_head($member)
{ {
$values=explode(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = preg_replace('/__ID__/i',$member->id,$values[3]); $head[$h][0] = DOL_URL_ROOT . preg_replace('/__ID__/i',$member->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);
$head[$h][2] = 'tab'.$values[1]; $head[$h][2] = 'tab'.$values[1];
$h++; $h++;

View File

@ -96,7 +96,7 @@ function commande_prepare_head($commande)
// 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:MyModule:@mymodule:/dolibarr/mymodule/mypage.php?id=__ID__'); // $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
if (is_array($conf->tabs_modules['order'])) if (is_array($conf->tabs_modules['order']))
{ {
$i=0; $i=0;
@ -104,7 +104,7 @@ function commande_prepare_head($commande)
{ {
$values=explode(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = preg_replace('/__ID__/i',$commande->id,$values[3]); $head[$h][0] = DOL_URL_ROOT . preg_replace('/__ID__/i',$commande->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);
$head[$h][2] = 'tab'.$values[1]; $head[$h][2] = 'tab'.$values[1];
$h++; $h++;

View File

@ -121,7 +121,7 @@ function product_prepare_head($product, $user)
// 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:MyModule:@mymodule:/dolibarr/mymodule/mypage.php?id=__ID__'); // $this->tabs = array('entity:MyModule:@mymodule:/mypage.php?id=__ID__');
if (is_array($conf->tabs_modules['product'])) if (is_array($conf->tabs_modules['product']))
{ {
$i=0; $i=0;
@ -129,7 +129,7 @@ function product_prepare_head($product, $user)
{ {
$values=explode(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = preg_replace('/__ID__/i',$product->id,$values[3]); $head[$h][0] = DOL_URL_ROOT . preg_replace('/__ID__/i',$product->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);
$head[$h][2] = 'tab'.$values[1]; $head[$h][2] = 'tab'.$values[1];
$h++; $h++;

View File

@ -60,7 +60,7 @@ function project_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:MyModule:@mymodule:/dolibarr/mymodule/mypage.php?id=__ID__'); // $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
if (is_array($conf->tabs_modules['project'])) if (is_array($conf->tabs_modules['project']))
{ {
$i=0; $i=0;
@ -68,7 +68,7 @@ function project_prepare_head($object)
{ {
$values=explode(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = preg_replace('/__ID__/i',$object->id,$values[3]); $head[$h][0] = DOL_URL_ROOT . preg_replace('/__ID__/i',$object->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);
$head[$h][2] = 'tab'.$values[1]; $head[$h][2] = 'tab'.$values[1];
$h++; $h++;
@ -108,7 +108,7 @@ function task_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:MyModule:@mymodule:/dolibarr/mymodule/mypage.php?id=__ID__'); // $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
if (is_array($conf->tabs_modules['task'])) if (is_array($conf->tabs_modules['task']))
{ {
$i=0; $i=0;
@ -116,7 +116,7 @@ function task_prepare_head($object)
{ {
$values=explode(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = preg_replace('/__ID__/i',$objsoc->id,$values[3]); $head[$h][0] = DOL_URL_ROOT . preg_replace('/__ID__/i',$objsoc->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);
$head[$h][2] = 'tab'.$values[1]; $head[$h][2] = 'tab'.$values[1];
$h++; $h++;

View File

@ -92,7 +92,7 @@ function propal_prepare_head($propal)
// 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:MyModule:@mymodule:/dolibarr/mymodule/mypage.php?id=__ID__'); // $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
if (is_array($conf->tabs_modules['propal'])) if (is_array($conf->tabs_modules['propal']))
{ {
$i=0; $i=0;
@ -100,7 +100,7 @@ function propal_prepare_head($propal)
{ {
$values=explode(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = preg_replace('/__ID__/i',$propal->id,$values[3]); $head[$h][0] = DOL_URL_ROOT . preg_replace('/__ID__/i',$propal->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);
$head[$h][2] = 'tab'.$values[1]; $head[$h][2] = 'tab'.$values[1];
$h++; $h++;