diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php
index 8e27ca708a95b00af827dbc9833af070a5459cb0..954241e655de253f6d3baeee8fcf51722a9e4d05 100644
--- a/htdocs/categories/edit.php
+++ b/htdocs/categories/edit.php
@@ -160,6 +160,7 @@ else
 	print '<tr><td>'.$langs->trans("ContentsVisibleByAll").'</td><td>';
 	print $html->selectyesno("visible",$categorie->visible,1);
 	print '</td></tr>';
+	print '<input type="hidden" name="socid" value="'.$categorie->socid.'">';
 }
 		
 print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'">';
diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php
index 63b4428234b348ad2311df8f83b86fc8ddf01e14..b7659fa2b9c014839bb43c60c3c0b83f7909c567 100644
--- a/htdocs/categories/viewcat.php
+++ b/htdocs/categories/viewcat.php
@@ -161,7 +161,8 @@ print "<div class='tabsAction'>\n";
 
 if ($user->rights->categorie->creer)
 {
-	print "<a class='butAction' href='edit.php?id=".$c->id."&amp;type=".$type."'>".$langs->trans("Modify")."</a>";
+	$socid = ($c->socid ? "&amp;socid=".$c->socid : "");
+	print "<a class='butAction' href='edit.php?id=".$c->id.$socid."&amp;type=".$type."'>".$langs->trans("Modify")."</a>";
 }
 
 if ($user->rights->categorie->supprimer)