Fix: try to use $GLOBALS in template
This commit is contained in:
parent
9637d10597
commit
cff0c2c339
@ -22,9 +22,17 @@
|
|||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE -->
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
$langs = $GLOBALS['langs'];
|
||||||
|
$somethingshown = $GLOBALS['somethingshown'];
|
||||||
|
$linkedObjectBlock = $GLOBALS['object']->linkedObjectBlock;
|
||||||
|
$objectid = $GLOBALS['object']->objectid;
|
||||||
|
$num = count($objectid);
|
||||||
|
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
if ($somethingshown) { echo '<br>'; }
|
if ($somethingshown) { echo '<br>'; }
|
||||||
print_titre($langs->trans('RelatedOrders'));
|
print_titre($langs->trans('RelatedOrders'));
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<table class="noborder" width="100%">
|
<table class="noborder" width="100%">
|
||||||
<tr class="liste_titre">
|
<tr class="liste_titre">
|
||||||
|
|||||||
@ -35,6 +35,9 @@ class CommonObject
|
|||||||
{
|
{
|
||||||
var $db;
|
var $db;
|
||||||
|
|
||||||
|
var $linkedObjectBlock;
|
||||||
|
var $objectid;
|
||||||
|
|
||||||
// Instantiate hook classe of thirdparty module
|
// Instantiate hook classe of thirdparty module
|
||||||
var $hooks=array();
|
var $hooks=array();
|
||||||
|
|
||||||
@ -1356,7 +1359,9 @@ class CommonObject
|
|||||||
|
|
||||||
//print 'objecttype='.$objecttype.'<br>';
|
//print 'objecttype='.$objecttype.'<br>';
|
||||||
|
|
||||||
$num = sizeof($objectid);
|
$this->objectid = $objectid;
|
||||||
|
|
||||||
|
$num = sizeof($this->objectid);
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
$classpath = $objecttype.'/class';
|
$classpath = $objecttype.'/class';
|
||||||
@ -1374,7 +1379,7 @@ class CommonObject
|
|||||||
{
|
{
|
||||||
dol_include_once("/".$classpath."/".$classfile.".class.php");
|
dol_include_once("/".$classpath."/".$classfile.".class.php");
|
||||||
}
|
}
|
||||||
$linkedObjectBlock = new $classname($this->db);
|
$this->linkedObjectBlock = new $classname($this->db);
|
||||||
dol_include_once('/'.$tplpath.'/tpl/linkedobjectblock.tpl.php');
|
dol_include_once('/'.$tplpath.'/tpl/linkedobjectblock.tpl.php');
|
||||||
|
|
||||||
return $num;
|
return $num;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user