Fix: Pb and translation of categories

This commit is contained in:
Laurent Destailleur 2008-03-07 00:32:18 +00:00
parent d6eb99c42d
commit 0572f6ffb1
4 changed files with 10 additions and 8 deletions

View File

@ -3,7 +3,7 @@
* Copyright (C) 2005 Davoleau Brice <brice.davoleau@gmail.com>
* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2006-2007 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2006-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
@ -19,14 +19,13 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
*/
/**
\file htdocs/categories/categorie.class.php
\ingroup categorie
\brief Fichier de la classe des categorie
\version $Id$
*/
require_once(DOL_DOCUMENT_ROOT."/product.class.php");

View File

@ -39,7 +39,6 @@ if ($_REQUEST["socid"])
if ($_REQUEST["typeid"] == 1) { $type = 'fournisseur'; $socid = isset($_REQUEST["socid"])?$_REQUEST["socid"]:''; }
if ($_REQUEST["typeid"] == 2) { $type = 'societe'; $socid = isset($_REQUEST["socid"])?$_REQUEST["socid"]:''; }
$objectid = isset($_REQUEST["socid"])?$_REQUEST["socid"]:'';
$type = 'societe';
}
else if ($_REQUEST["id"] || $_REQUEST["ref"])
{
@ -91,11 +90,13 @@ if (isset($_REQUEST["catMere"]) && $_REQUEST["catMere"]>=0)
$type = 'product';
}
$cat = new Categorie($db,$_REQUEST["catMere"]);
$cat = new Categorie($db);
$result=$cat->fetch($_REQUEST["catMere"]);
$result=$cat->add_type($object,$type);
if ($result >= 0)
{
$mesg='<div class="ok">'.$langs->trans("WasAddedSuccessfully").'</div>';
$mesg='<div class="ok">'.$langs->trans("WasAddedSuccessfully",$cat->label).'</div>';
}
else
{

View File

@ -37,7 +37,8 @@ ErrCatAlreadyExists=This name is already used
AddProductToCat=Add this product to a category?
ImpossibleAddCat=Impossible to add the category
ImpossibleAssociateCategory=Impossible to associate the category to
WasAddedSuccessfully=was added successfully.
WasAddedSuccessfully=<b>%s</b> was added successfully.
ObjectAlreadyLinkedToCategory=Element is already linked to this category.
CategorySuccessfullyCreated=This category %s has been added with success.
ProductIsInCategories=Product/service owns to following categories
SupplierIsInCategories=Third party owns to following suppliers categories

View File

@ -37,7 +37,8 @@ ErrCatAlreadyExists=Ce nom est d
AddProductToCat=Ajouter ce produit à une catégorie ?
ImpossibleAddCat=Impossible d'ajouter la catégorie
ImpossibleAssociateCategory=Impossible d'associer la catégorie
WasAddedSuccessfully=a été ajoutée avec succès.
WasAddedSuccessfully=<b>%s</b> a été ajoutée avec succčs.
ObjectAlreadyLinkedToCategory=L'élément est déjŕ lié ŕ cette catégorie.
CategorySuccessfullyCreated=La catégorie %s a été ajouté avec succès.
ProductIsInCategories=Ce produit/service est dans les catégories suivantes
SupplierIsInCategories=Ce fournisseur est dans les catégories suivantes