Fix: débugage des empty box
This commit is contained in:
parent
0fe4408ce5
commit
65888c67a7
@ -189,6 +189,8 @@ class InfoBox
|
|||||||
$i=0;
|
$i=0;
|
||||||
$listarray=split(',',$list);
|
$listarray=split(',',$list);
|
||||||
foreach ($listarray as $id)
|
foreach ($listarray as $id)
|
||||||
|
{
|
||||||
|
if (is_numeric($id))
|
||||||
{
|
{
|
||||||
//dolibarr_syslog("aaaaa".sizeof($listarray));
|
//dolibarr_syslog("aaaaa".sizeof($listarray));
|
||||||
$i++;
|
$i++;
|
||||||
@ -211,6 +213,7 @@ class InfoBox
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ($error)
|
if ($error)
|
||||||
{
|
{
|
||||||
$this->error=$this->db->error();
|
$this->error=$this->db->error();
|
||||||
|
|||||||
@ -569,7 +569,7 @@ if (sizeof($boxarray))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If no box on left, we show add an invisible empty box
|
// If no box on left, we show add an invisible empty box
|
||||||
if (! $ii)
|
if ($ii==0)
|
||||||
{
|
{
|
||||||
$box->box_id='A';
|
$box->box_id='A';
|
||||||
$box->info_box_head=array();
|
$box->info_box_head=array();
|
||||||
@ -586,13 +586,15 @@ if (sizeof($boxarray))
|
|||||||
// print '<div id="right" style="position: absolute; display: block; width: 50%; padding: 0px; margin: 0px; float: right;">'."\n";
|
// print '<div id="right" style="position: absolute; display: block; width: 50%; padding: 0px; margin: 0px; float: right;">'."\n";
|
||||||
print '<div id="right" style="width: 50%; padding: 0px; margin: 0px; float: right;">'."\n";
|
print '<div id="right" style="width: 50%; padding: 0px; margin: 0px; float: right;">'."\n";
|
||||||
$ii=0;
|
$ii=0;
|
||||||
|
$boxarray=$infobox->listboxes("0",$user); // on régénère la liste pour éviter les erreurs avec les empty box
|
||||||
foreach ($boxarray as $key => $box)
|
foreach ($boxarray as $key => $box)
|
||||||
{
|
{
|
||||||
if (eregi('^B',$box->box_order)) // colonne B
|
if (eregi('^B',$box->box_order)) // colonne B
|
||||||
{
|
{
|
||||||
$ii++;
|
$ii++;
|
||||||
//print 'box_id '.$boxarray[$ii]->box_id.' ';
|
//print 'key:'.$key.'<br>';
|
||||||
//print 'box_order '.$boxarray[$ii]->box_order.'<br>';
|
//print 'box_id '.$boxarray[$key]->box_id.' ';
|
||||||
|
//print 'box_order '.$boxarray[$key]->box_order.'<br>';
|
||||||
$boxid_right[$key] = $boxarray[$key]->box_id;
|
$boxid_right[$key] = $boxarray[$key]->box_id;
|
||||||
// Affichage boite key
|
// Affichage boite key
|
||||||
$box->loadBox();
|
$box->loadBox();
|
||||||
@ -600,8 +602,8 @@ if (sizeof($boxarray))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no box on left, we show add an invisible empty box
|
// If no box on right, we show add an invisible empty box
|
||||||
if (! $ii)
|
if ($ii==0)
|
||||||
{
|
{
|
||||||
$box->box_id='B';
|
$box->box_id='B';
|
||||||
$box->info_box_head=array();
|
$box->info_box_head=array();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user