New: Adding a box add it on column with the less boxes.
This commit is contained in:
parent
b57de4fbac
commit
426b3c2627
@ -54,7 +54,12 @@ print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY
|
|||||||
// Add a box
|
// Add a box
|
||||||
if ($boxid > 0 && $zone !='' && $userid > 0)
|
if ($boxid > 0 && $zone !='' && $userid > 0)
|
||||||
{
|
{
|
||||||
$boxorder=preg_replace('/^A:/','A:'.$boxid.',',$boxorder); // Insert id of new box into list
|
$tmp=explode('-',$boxorder);
|
||||||
|
$nbboxonleft=substr_count($tmp[0],',');
|
||||||
|
$nbboxonright=substr_count($tmp[1],',');
|
||||||
|
print $nbboxonleft.'-'.$nbboxonright;
|
||||||
|
if ($nbboxonleft > $nbboxonright) $boxorder=preg_replace('/B:/','B:'.$boxid.',',$boxorder); // Insert id of new box into list
|
||||||
|
else $boxorder=preg_replace('/^A:/','A:'.$boxid.',',$boxorder); // Insert id of new box into list
|
||||||
}
|
}
|
||||||
|
|
||||||
// Registering the location of boxes after a move
|
// Registering the location of boxes after a move
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user