diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php
index aa5b5401b5a..54ffc826503 100644
--- a/htdocs/admin/boxes.php
+++ b/htdocs/admin/boxes.php
@@ -48,6 +48,7 @@ if ($action == 'delete')
*
*
*/
+$boxes = array();
$pos[0] = "Homepage";
$pos[1] = "Gauche";
@@ -68,26 +69,10 @@ if ($result)
print '
| '.$obj->name.' | ' . $pos[$obj->position] . ' | ';
- if ($rowid == $obj->rowid && $action == 'edit')
- {
- print '';
- }
- else
- {
- print 'Supprimer';
- }
+ print 'Supprimer';
+
+ array_push($boxes, $obj->box_id);
print ' |
';
@@ -116,7 +101,7 @@ if ($result)
{
$obj = $db->fetch_object( $i);
- print '| '.$obj->name.' | ' . $obj->file . ' | ';
+ print ' |
| '.$obj->name.' | ' . $obj->file . ' | ';
if ($rowid == $obj->rowid && $action == 'edit')
{
@@ -137,7 +122,14 @@ if ($result)
}
else
{
- print 'Ajouter';
+ if (! in_array($obj->rowid, $boxes))
+ {
+ print 'Ajouter';
+ }
+ else
+ {
+ print " ";
+ }
}
print ' |
';