From 24e8092e4b5255d825ba9a53f3691c842317fab8 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 16 Jun 2007 20:22:38 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20erreur=20=E0=20la=20suppression=20d'une?= =?UTF-8?q?=20cat=E9gorie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/categories/index.php | 6 +++--- htdocs/categories/viewcat.php | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index ff6c93ebcac..4a1b3693ccf 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -97,7 +97,7 @@ if($_POST['catname'] || $_REQUEST['id']) { $var = ! $var; print "\t\n"; - print "\t\t".$cat->label."\n"; + print "\t\t".$cat->label."\n"; print "\t\t".$cat->description."\n"; print "\t\n"; } @@ -170,7 +170,7 @@ if ($conf->use_javascript) $newelement=array( 'text' => $cate_arbo[$key]['label'], //'link' => $_SERVER["PHP_SELF"].'?id='.$cate_arbo[$key]['id'], - 'link' => DOL_URL_ROOT.'/categories/viewcat.php?id='.$cate_arbo[$key]['id'], + 'link' => DOL_URL_ROOT.'/categories/viewcat.php?id='.$cate_arbo[$key]['id'].'&type='.$type, 'icon' => $icon, 'expandedIcon' => $expandedIcon ); @@ -240,7 +240,7 @@ else { $var = ! $var; print "\t\n"; - print ''.$cate_arbo[$key]['fulllabel'].''; + print ''.$cate_arbo[$key]['fulllabel'].''; print ''.$c->get_desc($cate_arbo[$key]['id']).''; print "\t\n"; } diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index eb0eb41cd8f..2ede508b314 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -33,6 +33,8 @@ if ($_REQUEST['id'] == "") exit(); } +$type=$_GET['type']; + // Securite $user->getrights('categorie'); if (! $user->rights->categorie->lire) @@ -78,7 +80,7 @@ if ($mesg) print $mesg.'
'; $h = 0; $head = array(); -$head[$h][0] = DOL_URL_ROOT.'/categories/viewcat.php?id='.$c->id; +$head[$h][0] = DOL_URL_ROOT.'/categories/viewcat.php?id='.$c->id.'&type='.$type; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; @@ -91,7 +93,7 @@ dolibarr_fiche_head($head, 'card', $langs->trans("Category")); */ if ($_GET['action'] == 'delete') { - $html->form_confirm($_SERVER["PHP_SELF"].'?id='.$c->id,$langs->trans('DeleteCategory'),$langs->trans('ConfirmDeleteCategory'),'confirm_delete'); + $html->form_confirm($_SERVER["PHP_SELF"].'?id='.$c->id.'&type='.$type,$langs->trans('DeleteCategory'),$langs->trans('ConfirmDeleteCategory'),'confirm_delete'); print '
'; } @@ -134,7 +136,7 @@ if ($user->rights->categorie->creer) if ($user->rights->categorie->supprimer) { - print "".$langs->trans("Delete").""; + print "".$langs->trans("Delete").""; } print ""; @@ -161,7 +163,7 @@ else $i++; $var=!$var; print "\t\n"; - print "\t\t".$cat->label."\n"; + print "\t\t".$cat->label."\n"; print "\t\t".$cat->description."\n"; if ($cat->visible == 1)