[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Dolibarr-dev] Grosse incomprehension
From: |
Christophe PEREZ |
Subject: |
Re: [Dolibarr-dev] Grosse incomprehension |
Date: |
Thu, 04 Jan 2007 13:57:09 -0400 |
Le jeudi 04 janvier 2007 à 16:28 +0100, Rodolphe Quiedeville a écrit :
> Je suis surpris de voir une utilisation de $db en tant que globale,
> cela
> vient à mon sens d'un problème de compréhension du code, je ne vais
> pas
> chercher qui à fait cette modif, mais il faut que l'on discute ici de
> ce
> problème de compréhension car on ne peut laisser du code comme cela
> dans
> Dolibarr.
$ cvs diff -r1.126 -r1.127 htdocs/product.class.php | head -n 25
Index: htdocs/product.class.php
===================================================================
RCS file: /cvsroot/dolibarr/dolibarr/htdocs/product.class.php,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -r1.126 -r1.127
--- htdocs/product.class.php 16 Sep 2006 12:14:36 -0000 1.126
+++ htdocs/product.class.php 30 Nov 2006 14:23:38 -0000 1.127
@@ -1,8 +1,9 @@
<?php
-/* Copyright (C) 2001-2005 Rodolphe Quiedeville
<address@hidden>
+/* Copyright (C) 2001-2006 Rodolphe Quiedeville
<address@hidden>
* Copyright (C) 2004-2006 Laurent Destailleur
<address@hidden>
* Copyright (C) 2005-2006 Regis Houssin
<address@hidden>
* Copyright (C) 2006 Andre Cianfarani <address@hidden>
+ *
* 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
@@ -17,1690 +18,1690 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*
- * $Id: product.class.php,v 1.126 2006/09/16 12:14:36 eldy Exp $
+ * $Id: product.class.php,v 1.127 2006/11/30 14:23:38 rodolphe Exp $
[...]
+ /**
+ * \brief Recopie les prix d'un produit/service sur un autre
+ * \param fromId Id produit source
+ * \param toId Id produit cible
+ * \return int < 0 si erreur, > 0 si ok
+ */
+ function clone_price($fromId, $toId)
+ {
+ global $db;
+ $db->begin();
hahahahaha !
--
Christophe PEREZ
--
Christophe
--
Christophe