Fix: select to add box was lost

This commit is contained in:
Laurent Destailleur 2016-02-07 02:22:10 +01:00
parent 3828fe7026
commit 8a8aaf618d

View File

@ -977,8 +977,12 @@ class FormOther
$confuserzone='MAIN_BOXES_'.$areacode; $confuserzone='MAIN_BOXES_'.$areacode;
// $boxactivated will be array of boxes enabled into global setup
// $boxidactivatedforuser will be array of boxes choosed by user
$selectboxlist=$boxlist=''; $selectboxlist=$boxlist='';
$boxactivated=InfoBox::listBoxes($db,'activated',$areacode,(empty($user->conf->$confuserzone)?null:$user)); // Search boxes of common+user (or common only if user has no specific setup) $boxactivated=InfoBox::listBoxes($db,'activated',$areacode,(empty($user->conf->$confuserzone)?null:$user)); // Search boxes of common+user (or common only if user has no specific setup)
//var_dump($boxactivated);
$boxidactivatedforuser=array(); $boxidactivatedforuser=array();
foreach($boxactivated as $box) foreach($boxactivated as $box)
@ -1174,7 +1178,7 @@ class FormOther
$boxlist.= "</table>"; $boxlist.= "</table>";
} }
return array('selectboxlist'=>$nbboxactivated?$selectboxlist:'', 'boxactivated'=>$boxactivated, 'boxlist'=>$boxlist); return array('selectboxlist'=>count($boxactivated)?$selectboxlist:'', 'boxactivated'=>$boxactivated, 'boxlist'=>$boxlist);
} }