diff --git a/htdocs/categories/categorie_list.php b/htdocs/categories/categorie_list.php
index f4cf516c4b7..9b99aa2da51 100644
--- a/htdocs/categories/categorie_list.php
+++ b/htdocs/categories/categorie_list.php
@@ -432,7 +432,7 @@ if ($mode == 'hierarchy') {
$entry .= ''.$li.'';
if (!empty($conf->main_checkbox_left_column)) {
if ($user->hasRight('categorie', 'creer')) {
- $entry .= ' ' . img_edit() . '';
+ $entry .= ' ' . img_edit() . '';
}
if ($user->hasRight('categorie', 'supprimer')) {
$entry .= ' ' . img_delete() . '';
@@ -446,7 +446,7 @@ if ($mode == 'hierarchy') {
if (empty($conf->main_checkbox_left_column)) {
$entry .= '
';
if ($user->hasRight('categorie', 'creer')) {
- $entry .= '' . img_edit() . '';
+ $entry .= '' . img_edit() . '';
}
$entry .= ' | ';
diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php
index d10758189df..62414a7b59a 100644
--- a/htdocs/categories/edit.php
+++ b/htdocs/categories/edit.php
@@ -49,6 +49,7 @@ $action = (GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'edit');
$confirm = GETPOST('confirm');
$cancel = GETPOST('cancel', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
+$dol_openinpopup = GETPOST('dol_openinpopup', 'aZ');
$socid = GETPOSTINT('socid');
$label = (string) GETPOST('label', 'alphanohtml');
@@ -103,7 +104,7 @@ if (empty($reshook)) {
header("Location: ".$backtopage);
exit;
} else {
- header('Location: '.DOL_URL_ROOT.'/categories/viewcat.php?id='.$object->id.'&type='.$type);
+ header('Location: '.DOL_URL_ROOT.'/categories/viewcat.php?id='.((int) $object->id).'&type='.urlencode($type).($dol_openinpopup ? '&dol_openinpopup='.urlencode($dol_openinpopup) : ''));
exit;
}
}
@@ -136,7 +137,7 @@ if (empty($reshook)) {
header("Location: ".$backtopage);
exit;
} else {
- header('Location: '.DOL_URL_ROOT.'/categories/viewcat.php?id='.$object->id.'&type='.$type);
+ header('Location: '.DOL_URL_ROOT.'/categories/viewcat.php?id='.((int) $object->id).'&type='.urlencode($type).($dol_openinpopup ? '&dol_openinpopup='.urlencode($dol_openinpopup) : ''));
exit;
}
} else {
@@ -170,6 +171,7 @@ print '';
print '';
print '';
print '';
+print '';
print dol_get_fiche_head([]);