Fix: [ bug #537 ] Fatal error: Using $this when not in object context
This commit is contained in:
parent
6162d296ce
commit
ba2f986282
@ -316,7 +316,7 @@ if ($resql)
|
|||||||
|
|
||||||
|
|
||||||
// Available boxes
|
// Available boxes
|
||||||
$boxtoadd=InfoBox::listboxes($db,'available',-1,$emptyuser,$actives);
|
$boxtoadd=InfoBox::listBoxes($db,'available',-1,$emptyuser,$actives);
|
||||||
|
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print_titre($langs->trans("BoxesAvailable"));
|
print_titre($langs->trans("BoxesAvailable"));
|
||||||
@ -366,7 +366,7 @@ print '</table>';
|
|||||||
|
|
||||||
|
|
||||||
// Activated boxes
|
// Activated boxes
|
||||||
$boxactivated=InfoBox::listboxes($db,'activated',-1,$emptyuser);
|
$boxactivated=InfoBox::listBoxes($db,'activated',-1,$emptyuser);
|
||||||
|
|
||||||
print "<br>\n\n";
|
print "<br>\n\n";
|
||||||
print_titre($langs->trans("BoxesActivated"));
|
print_titre($langs->trans("BoxesActivated"));
|
||||||
|
|||||||
@ -809,7 +809,7 @@ class FormOther
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
|
||||||
|
|
||||||
//$infobox=new InfoBox($db);
|
//$infobox=new InfoBox($db);
|
||||||
$boxactivated=InfoBox::listboxes($db,'activated',$areacode,$user);
|
$boxactivated=InfoBox::listBoxes($db,'activated',$areacode,$user);
|
||||||
$arrayboxactivatedid=array();
|
$arrayboxactivatedid=array();
|
||||||
foreach($boxactivated as $box) $arrayboxactivatedid[$box->id]=$box->id;
|
foreach($boxactivated as $box) $arrayboxactivatedid[$box->id]=$box->id;
|
||||||
|
|
||||||
@ -817,7 +817,7 @@ class FormOther
|
|||||||
if (! empty($conf->use_javascript_ajax))
|
if (! empty($conf->use_javascript_ajax))
|
||||||
{
|
{
|
||||||
$emptyuser=new User($db);
|
$emptyuser=new User($db);
|
||||||
$boxavailable=InfoBox::listboxes($db,'activated',$areacode,$emptyuser,$arrayboxactivatedid); // Get list of box available for empty user (minus already activated for user)
|
$boxavailable=InfoBox::listBoxes($db,'activated',$areacode,$emptyuser,$arrayboxactivatedid); // Get list of box available for empty user (minus already activated for user)
|
||||||
|
|
||||||
$arrayboxtoactivatelabel=array();
|
$arrayboxtoactivatelabel=array();
|
||||||
foreach($boxavailable as $box)
|
foreach($boxavailable as $box)
|
||||||
|
|||||||
@ -137,8 +137,8 @@ class InfoBox
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//dol_print_error($db);
|
//dol_print_error($db);
|
||||||
$this->error=$db->error();
|
$error=$db->error();
|
||||||
dol_syslog(get_class()."::listBoxes Error ".$this->error, LOG_ERR);
|
dol_syslog(get_class()."::listBoxes Error ".$error, LOG_ERR);
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,7 +231,7 @@ class InfoBox
|
|||||||
}
|
}
|
||||||
if ($error)
|
if ($error)
|
||||||
{
|
{
|
||||||
$this->error=$db->error();
|
$error=$db->error();
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
@ -243,9 +243,9 @@ class InfoBox
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$db->lasterror();
|
$error=$db->lasterror();
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
dol_syslog(get_class()."::saveboxorder ".$this->error);
|
dol_syslog(get_class()."::saveboxorder ".$error);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user