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