Fix: missing globals
This commit is contained in:
parent
31ff9bb739
commit
2031989a0a
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
/* Copyright (C) 2010-2011 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -121,12 +121,6 @@ class Canvas
|
|||||||
$this->control->object = new $modelclassname($this->db);
|
$this->control->object = new $modelclassname($this->db);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Include specific library
|
|
||||||
/* Removed because specific libraries must be included by files that need them only, so by actions and/or dao files.
|
|
||||||
$libfile = dol_buildpath('/'.$dirmodule.'/lib/'.$dirmodule.'.lib.php');
|
|
||||||
if (file_exists($libfile)) require_once($libfile);
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Template dir
|
// Template dir
|
||||||
$this->template_dir = dol_buildpath('/'.$dirmodule.'/canvas/'.$this->canvas.'/tpl/');
|
$this->template_dir = dol_buildpath('/'.$dirmodule.'/canvas/'.$this->canvas.'/tpl/');
|
||||||
if (! is_dir($this->template_dir))
|
if (! is_dir($this->template_dir))
|
||||||
@ -238,7 +232,8 @@ class Canvas
|
|||||||
*/
|
*/
|
||||||
function display_canvas($mode='view')
|
function display_canvas($mode='view')
|
||||||
{
|
{
|
||||||
global $conf, $langs, $user, $canvas;
|
global $db, $conf, $langs, $user, $canvas;
|
||||||
|
global $form, $formfile;
|
||||||
|
|
||||||
//print $this->template_dir.$this->card.'_'.$mode.'.tpl.php';exit;
|
//print $this->template_dir.$this->card.'_'.$mode.'.tpl.php';exit;
|
||||||
include($this->template_dir.$this->card.'_'.$mode.'.tpl.php'); // Include native PHP template
|
include($this->template_dir.$this->card.'_'.$mode.'.tpl.php'); // Include native PHP template
|
||||||
|
|||||||
@ -282,13 +282,13 @@ $somethingshown=$formfile->show_documents('company',$socid,$filedir,$urlsource,$
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
// Subsidiaries list
|
// Subsidiaries list
|
||||||
$result=show_subsidiaries($conf,$langs,$db,$objcanvas->control->object);
|
$result=show_subsidiaries($conf,$langs,$db,$soc);
|
||||||
|
|
||||||
// Contacts list
|
// Contacts list
|
||||||
$result=show_contacts($conf,$langs,$db,$objcanvas->control->object);
|
$result=show_contacts($conf,$langs,$db,$soc);
|
||||||
|
|
||||||
// Projects list
|
// Projects list
|
||||||
$result=show_projects($conf,$langs,$db,$objcanvas->control->object);
|
$result=show_projects($conf,$langs,$db,$soc);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
<!-- END PHP TEMPLATE -->
|
||||||
@ -223,13 +223,13 @@ $somethingshown=$formfile->show_documents('company',$socid,$filedir,$urlsource,$
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
// Subsidiaries list
|
// Subsidiaries list
|
||||||
$result=show_subsidiaries($conf,$langs,$db,$objcanvas->control->object);
|
$result=show_subsidiaries($conf,$langs,$db,$soc);
|
||||||
|
|
||||||
// Contacts list
|
// Contacts list
|
||||||
$result=show_contacts($conf,$langs,$db,$objcanvas->control->object);
|
$result=show_contacts($conf,$langs,$db,$soc);
|
||||||
|
|
||||||
// Projects list
|
// Projects list
|
||||||
$result=show_projects($conf,$langs,$db,$objcanvas->control->object);
|
$result=show_projects($conf,$langs,$db,$soc);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
<!-- END PHP TEMPLATE -->
|
||||||
Loading…
Reference in New Issue
Block a user