From 5fe215cf4049f023e3d6e5ab06304f2078215ad6 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 22 Mar 2010 13:24:43 +0000 Subject: [PATCH] Fix: rename option --- htdocs/lib/product.lib.php | 4 +- .../{sousproduits => composition}/fiche.php | 7 +- .../{sousproduits => composition}/index.php | 0 htdocs/product/sousproduits/pre.inc.php | 106 ------------------ 4 files changed, 6 insertions(+), 111 deletions(-) rename htdocs/product/{sousproduits => composition}/fiche.php (98%) rename htdocs/product/{sousproduits => composition}/index.php (100%) delete mode 100644 htdocs/product/sousproduits/pre.inc.php diff --git a/htdocs/lib/product.lib.php b/htdocs/lib/product.lib.php index 1773719a215..a00694e4015 100644 --- a/htdocs/lib/product.lib.php +++ b/htdocs/lib/product.lib.php @@ -1,7 +1,7 @@ * Copyright (C) 2007 Rodolphe Quiedeville - * Copyright (C) 2009 Regis Houssin + * Copyright (C) 2009-2010 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -89,7 +89,7 @@ function product_prepare_head($product, $user) // Sub products if($conf->global->PRODUIT_SOUSPRODUITS) { - $head[$h][0] = DOL_URL_ROOT."/product/sousproduits/fiche.php?id=".$product->id; + $head[$h][0] = DOL_URL_ROOT."/product/composition/fiche.php?id=".$product->id; $head[$h][1] = $langs->trans('AssociatedProducts'); $head[$h][2] = 'subproduct'; $h++; diff --git a/htdocs/product/sousproduits/fiche.php b/htdocs/product/composition/fiche.php similarity index 98% rename from htdocs/product/sousproduits/fiche.php rename to htdocs/product/composition/fiche.php index 27b52c6f02f..5e828c21d0d 100644 --- a/htdocs/product/sousproduits/fiche.php +++ b/htdocs/product/composition/fiche.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2007 Rodolphe Quiedeville * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005 Eric Seigne - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * * This program is free software; you can redistribute it and/or modify @@ -21,13 +21,14 @@ */ /** - * \file htdocs/product/sousproduits/fiche.php + * \file htdocs/product/composition/fiche.php * \ingroup product * \brief Page de la fiche produit * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); + require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php"); require_once(DOL_DOCUMENT_ROOT."/product.class.php"); require_once(DOL_DOCUMENT_ROOT."/categories/categorie.class.php"); diff --git a/htdocs/product/sousproduits/index.php b/htdocs/product/composition/index.php similarity index 100% rename from htdocs/product/sousproduits/index.php rename to htdocs/product/composition/index.php diff --git a/htdocs/product/sousproduits/pre.inc.php b/htdocs/product/sousproduits/pre.inc.php deleted file mode 100644 index a5f7c01e0ed..00000000000 --- a/htdocs/product/sousproduits/pre.inc.php +++ /dev/null @@ -1,106 +0,0 @@ - - * Copyright (C) 2004 Laurent Destailleur - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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. - */ - -/** - * \file htdocs/product/pre.inc.php - * \ingroup product,service - * \brief Fichier gestionnaire du menu gauche des produits et services - * \version $Id$ - */ -require("../../main.inc.php"); - -$langs->load("products"); - - -function llxHeader($head = "", $urlp = "", $title="") -{ - global $user, $conf, $langs; - $langs->load("products"); - - top_menu($head, $title); - - $menu = new Menu(); - - // Products - if ($conf->produit->enabled) - { - $menu->add(DOL_URL_ROOT."/product/index.php?type=0", $langs->trans("Products")); - $menu->add_submenu(DOL_URL_ROOT."/product/liste.php?type=0", $langs->trans("List")); - - if ($user->societe_id == 0 && $user->rights->produit->creer) - { - $menu->add_submenu(DOL_URL_ROOT."/product/fiche.php?action=create&type=0", $langs->trans("NewProduct")); - } - } - - // Services - if ($conf->service->enabled) - { - $menu->add(DOL_URL_ROOT."/product/index.php?type=1", $langs->trans("Services")); - $menu->add_submenu(DOL_URL_ROOT."/product/liste.php?type=1", $langs->trans("List")); - if ($user->societe_id == 0 && $user->rights->produit->creer) - { - $menu->add_submenu(DOL_URL_ROOT."/product/fiche.php?action=create&type=1", $langs->trans("NewService")); - } - } - - if ($conf->boutique->enabled) - { - $menu->add(DOL_URL_ROOT."/product/osc-liste.php", "Osc"); - $menu->add_submenu(DOL_URL_ROOT."/product/osc-liste.php?reqstock=epuise", "Produits Epuis�s"); - - $menu->add(DOL_URL_ROOT."/product/osc-reviews.php", $langs->trans("Criticals")); - - $menu->add_submenu(DOL_URL_ROOT."/product/osc-productsbyreviews.php", "Meilleurs produits"); - - $menu->add(DOL_URL_ROOT."/product/album/", "Albums"); - $menu->add(DOL_URL_ROOT."/product/groupart/", "Groupes/Artistes"); - - $menu->add(DOL_URL_ROOT."/product/categorie/", $langs->trans("Categories")); - } - - if ($conf->fournisseur->enabled) { - $langs->load("suppliers"); - $menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers")); - } - - $menu->add(DOL_URL_ROOT."/product/stats/", $langs->trans("Statistics")); - if ($conf->propal->enabled) - { - $menu->add_submenu(DOL_URL_ROOT."/product/popuprop.php", $langs->trans("Popularity")); - } - - if ($conf->stock->enabled) - { - $menu->add(DOL_URL_ROOT."/product/stock/", $langs->trans("Stock")); - } - - if ($conf->categorie->enabled) - { - $menu->add(DOL_URL_ROOT."/categories/", $langs->trans("Categories")); - } - - left_menu($menu->liste); - /* - * - * - */ - -} -?>