From 08e33f20dc361d15ebe6c5b491c155db7b5e1149 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 19 Jan 2012 09:53:27 +0100 Subject: [PATCH] Qual: Uniformize code Doxygen --- htdocs/categories/class/categorie.class.php | 12 +- htdocs/fourn/class/fournisseur.class.php | 41 ----- .../class/fournisseur.commande.class.php | 141 +++++++----------- .../fourn/class/fournisseur.facture.class.php | 32 ++-- htdocs/fourn/class/paiementfourn.class.php | 19 ++- htdocs/fourn/commande/fiche.php | 48 +++--- htdocs/fourn/product/categorie.php | 3 +- htdocs/fourn/product/index.php | 4 +- htdocs/fourn/product/liste.php | 6 +- htdocs/fourn/product/photos.php | 4 +- 10 files changed, 128 insertions(+), 182 deletions(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 2985e4651e0..9ffa2593983 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2005 Davoleau Brice * Copyright (C) 2005 Rodolphe Quiedeville * Copyright (C) 2006-2011 Regis Houssin - * Copyright (C) 2006-2011 Laurent Destailleur + * Copyright (C) 2006-2012 Laurent Destailleur * Copyright (C) 2007 Patrick Raguin * * This program is free software; you can redistribute it and/or modify @@ -54,12 +54,12 @@ class Categorie /** * Constructor * - * @param DoliDB $DB Database handler + * @param DoliDB $db Database handler * @param int $id Id of category to fetch during init */ - function Categorie($DB, $id=-1) + function Categorie($db, $id=-1) { - $this->db = $DB; + $this->db = $db; $this->id = $id; if ($id != -1) $this->fetch($this->id); @@ -132,7 +132,7 @@ class Categorie $langs->load('categories'); $error=0; - + // Clean parameters if (empty($this->visible)) $this->visible=0; $this->parentId = ($this->id_mere) != "" ? intval($this->id_mere) : 0; @@ -214,7 +214,7 @@ class Categorie global $conf, $langs; $error=0; - + // Clean parameters $this->label=trim($this->label); $this->description=trim($this->description); diff --git a/htdocs/fourn/class/fournisseur.class.php b/htdocs/fourn/class/fournisseur.class.php index 43ef033c532..d384a3bade6 100644 --- a/htdocs/fourn/class/fournisseur.class.php +++ b/htdocs/fourn/class/fournisseur.class.php @@ -104,47 +104,6 @@ class Fournisseur extends Societe } } - /** - * Create the order from an existing - * - * @param User $user Creator user - * @param int $idc Id source - * @param int $comclientid Id thirdparty - */ - function updateFromCommandeClient($user, $idc, $comclientid) - { - $comm = new CommandeFournisseur($this->db); - $comm->socid = $this->id; - - $comm->updateFromCommandeClient($user, $idc, $comclientid); - } - - /** - * Create the order with draft status - - * @param User $user Creator user - * @return int <0 if ko, id of order if ok - */ - function create_commande($user) - { - dol_syslog("Fournisseur::Create_Commande"); - $comm = new CommandeFournisseur($this->db); - $comm->socid = $this->id; - - if ($comm->create($user) > 0) - { - $this->single_open_commande = $comm->id; - return $comm->id; - } - else - { - $this->error=$comm->error; - dol_syslog("Fournisseur::Create_Commande Failed ".$this->error, LOG_ERR); - return -1; - } - } - - /** * Load statistics indicators * diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index f45f7ba25d1..e3b2e3fe89c 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2010-2011 Juanjo Menent @@ -70,12 +70,14 @@ class CommandeFournisseur extends Commande var $mode_reglement_code; - /** Constructeur - * @param DoliDB $DB Handler d'acces aux bases de donnees + /** + * Constructor + * + * @param DoliDB $db Handler d'acces aux bases de donnees */ - function CommandeFournisseur($DB) + function CommandeFournisseur($db) { - $this->db = $DB; + $this->db = $db; $this->products = array(); $this->lines = array(); @@ -239,6 +241,7 @@ class CommandeFournisseur extends Commande /** * Add a line in log table + * * @param User $user User making action * @param int $statut Status of order * @param date $datelog Date of change @@ -460,8 +463,9 @@ class CommandeFournisseur extends Commande /** * Return label of the status of object - * @param mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label - * @return string Label + * + * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label + * @return string Label */ function getLibStatut($mode=0) { @@ -470,10 +474,10 @@ class CommandeFournisseur extends Commande /** * Return label of a status - * - * @param int $statut Id statut - * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto - * @return string Label of status + * + * @param int $statut Id statut + * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto + * @return string Label of status */ function LibStatut($statut,$mode=0) { @@ -568,7 +572,7 @@ class CommandeFournisseur extends Commande /** * Renvoie la reference de commande suivante non utilisee en fonction du modele * de numerotation actif defini dans COMMANDE_SUPPLIER_ADDON - * + * * @param Societe $soc objet societe * @return string reference libre pour la facture */ @@ -703,7 +707,7 @@ class CommandeFournisseur extends Commande /** * Refuse an order - * + * * @param User $user User making action * @return int 0 if Ok, <0 if Ko */ @@ -712,7 +716,7 @@ class CommandeFournisseur extends Commande global $conf, $langs; $error=0; - + dol_syslog("CommandeFournisseur::Refuse"); $result = 0; if ($user->rights->fournisseur->commande->approuver) @@ -760,7 +764,7 @@ class CommandeFournisseur extends Commande global $langs,$conf; $error=0; - + //dol_syslog("CommandeFournisseur::Cancel"); $result = 0; if ($user->rights->fournisseur->commande->commander) @@ -814,6 +818,7 @@ class CommandeFournisseur extends Commande /** * Send a supplier order to supplier + * * @param User $user User making change * @param date $date Date * @param int $methode Method @@ -850,6 +855,7 @@ class CommandeFournisseur extends Commande /** * Create order with draft status + * * @param User $user User making creation * @return int <0 if KO, Id of supplier order if OK */ @@ -858,7 +864,7 @@ class CommandeFournisseur extends Commande global $langs,$conf; $this->db->begin(); - + $error=0; $now=dol_now(); @@ -888,15 +894,15 @@ class CommandeFournisseur extends Commande //$sql.= ", ".$this->mode_reglement_id; $sql.= ")"; - dol_syslog("CommandeFournisseur::Create sql=".$sql); - if ( $this->db->query($sql) ) + dol_syslog(get_class($this)."::create sql=".$sql); + if ($this->db->query($sql)) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."commande_fournisseur"); $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur"; $sql.= " SET ref='(PROV".$this->id.")'"; $sql.= " WHERE rowid=".$this->id; - dol_syslog("CommandeFournisseur::Create sql=".$sql); + dol_syslog(get_class($this)."::create sql=".$sql); if ($this->db->query($sql)) { // On logue creation pour historique @@ -915,7 +921,7 @@ class CommandeFournisseur extends Commande else { $this->error=$this->db->error(); - dol_syslog("CommandeFournisseur::Create: Failed -2 - ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::create: Failed -2 - ".$this->error, LOG_ERR); $this->db->rollback(); return -2; } @@ -923,7 +929,7 @@ class CommandeFournisseur extends Commande else { $this->error=$this->db->error(); - dol_syslog("CommandeFournisseur::Create: Failed -1 - ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::create: Failed -1 - ".$this->error, LOG_ERR); $this->db->rollback(); return -1; } @@ -945,6 +951,7 @@ class CommandeFournisseur extends Commande * @param string $price_base_type HT or TTC * @param double $pu_ttc Unit price TTC * @param int $type Type of line (0=product, 1=service) + * @param int $info_bits More information * @return int <=0 if KO, >0 if OK */ function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $fk_prod_fourn_price=0, $fourn_ref='', $remise_percent=0, $price_base_type='HT', $pu_ttc=0, $type=0, $info_bits=0) @@ -1255,7 +1262,7 @@ class CommandeFournisseur extends Commande /** * Get list of order methods - * + * * @return 0 if Ok, <0 if Ko */ function get_methodes_commande() @@ -1288,7 +1295,7 @@ class CommandeFournisseur extends Commande /** * Change les conditions de reglement de la commande - * + * * @param int $cond_reglement_id Id de la nouvelle condition de reglement * @return int >0 si ok, <0 si ko */ @@ -1322,7 +1329,7 @@ class CommandeFournisseur extends Commande /** * Change le mode de reglement - * + * * @param int $mode_reglement_id Id du nouveau mode * @return int >0 if OK, <0 if KO */ @@ -1356,11 +1363,12 @@ class CommandeFournisseur extends Commande /** * Set a delivery in database for this supplier order - * - * @param User $user User that input data - * @param date $date Date of reception - * @param string $type Type of receipt - * @param string $comment Comment + * + * @param User $user User that input data + * @param date $date Date of reception + * @param string $type Type of receipt + * @param string $comment Comment + * @return int <0 if KO, >0 if OK */ function Livraison($user, $date, $type, $comment) { @@ -1416,10 +1424,12 @@ class CommandeFournisseur extends Commande } /** - * Cree la commande depuis une propale existante - * @param User $user Utilisateur qui cree - * @param int $idc Id de la propale qui sert de modele - * @param int $comclientid Id thirdparty + * Update a supplier order from a customer order + * + * @param User $user User that create + * @param int $idc Id of supplier order to update + * @param int $comclientid Id of customer order to use as template + * @return int <0 if KO, >0 if OK */ function updateFromCommandeClient($user, $idc, $comclientid) { @@ -1446,7 +1456,7 @@ class CommandeFournisseur extends Commande $sql .= ",".$comclient->lines[$i]->fk_product.",'".price2num($comclient->lines[$i]->price)."'"; $sql .= ", '".$comclient->lines[$i]->qty."', ".$comclient->lines[$i]->tva_tx.", ".$comclient->lines[$i]->localtax1_tx.", ".$comclient->lines[$i]->localtax2_tx.", ".$comclient->lines[$i]->remise_percent; $sql .= ", '".price2num($comclient->lines[$i]->subprice)."','0','".$ref."');"; - if ( $this->db->query( $sql) ) + if ($this->db->query($sql)) { $this->update_price(); } @@ -1479,7 +1489,7 @@ class CommandeFournisseur extends Commande $sql.= " note_public ='".$this->db->escape($note_public)."'"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog("CommandeFournisseur::UpdateNote sql=".$sql); + dol_syslog(get_class($this)."::UpdateNote sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -1488,54 +1498,16 @@ class CommandeFournisseur extends Commande else { $this->error=$this->db->error(); - dol_syslog("CommandeFournisseur::UpdateNote ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::UpdateNote ".$this->error, LOG_ERR); $result = -1; } return $result ; } - /** - * Get list of user that can approve an order - */ - function ReadApprobators() - { - global $conf; - - $this->approbs = array(); - - $sql = "SELECT u.name, u.firstname, u.email"; - $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; - $sql.= " , ".MAIN_DB_PREFIX."user_rights as ur"; - $sql.= " WHERE u.rowid = ur.fk_user"; - $sql.= " AND u.entity = ".$conf->entity; - $sql.= " AND ur.fk_id = 184"; - - $resql = $this->db->query($sql); - if ($resql) - { - $num = $this->db->num_rows($resql); - $i = 0; - - while ($i < $num) - { - $row = $this->db->fetch_row($resql); - $this->approbs[$i] = $row; - $i++; - } - - $this->db->free($resql); - } - else - { - dol_syslog("ReadApprobators Erreur", LOG_ERR); - } - } - - /** * Tag order with a particular status - * + * * @param User $user Object user that change status * @param int $status New status * @return int <0 if KO, >0 if OK @@ -1584,15 +1556,15 @@ class CommandeFournisseur extends Commande * @param double $pu Prix unitaire * @param double $qty Quantity * @param double $remise_percent Pourcentage de remise de la ligne - * @param double $tva_tx Taux TVA - * @param double $localtax1 Localtax1 tax - * @param double $localtax2 Localtax2 tax + * @param double $txtva Taux TVA + * @param double $txlocaltax1 Localtax1 tax + * @param double $txlocaltax2 Localtax2 tax * @param double $price_base_type Type of price base * @param int $info_bits Miscellanous informations * @param int $type Type of line (0=product, 1=service) * @return int < 0 if error, > 0 if ok */ - function updateline($rowid, $desc, $pu, $qty, $remise_percent=0, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type=0) + function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type=0) { dol_syslog("CommandeFournisseur::UpdateLine $rowid, $desc, $pu, $qty, $remise_percent, $txtva, $price_base_type, $info_bits, $type"); include_once(DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'); @@ -1859,17 +1831,18 @@ class CommandeFournisseurLigne extends OrderLine /** * Constructor * - * @param DoliDB $DB Database handler + * @param DoliDB $db Database handler */ - function CommandeFournisseurLigne($DB) + function CommandeFournisseurLigne($db) { - $this->db= $DB; + $this->db= $db; } /** * Load line order * - * @param int $rowid id line order + * @param int $rowid Id line order + * @return int <0 if KO, >0 if OK */ function fetch($rowid) { @@ -1919,7 +1892,7 @@ class CommandeFournisseurLigne extends OrderLine /** * Mise a jour de l'objet ligne de commande en base - * + * * @return int <0 si ko, >0 si ok */ function update_total() diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 7a2a71f46c9..4e4208e161c 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2004 Christophe Combelles * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2009 Regis Houssin @@ -691,7 +691,7 @@ class FactureFournisseur extends Facture * Tag la facture comme non payee completement + appel trigger BILL_UNPAYED * Fonction utilisee quand un paiement prelevement est refuse, * ou quand une facture annulee et reouverte. - * + * * @param User $user Object user that change status * @return int <0 si ok, >0 si ok */ @@ -909,8 +909,8 @@ class FactureFournisseur extends Facture * Les parametres sont deja cense etre juste et avec valeurs finales a l'appel * de cette methode. Aussi, pour le taux tva, il doit deja avoir ete defini * par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,idprod) - * et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue) - + * et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue). + * * @param string $desc Description de la ligne * @param double $pu Prix unitaire (HT ou TTC selon price_base_type, > 0 even for credit note) * @param double $txtva Taux de tva force, sinon -1 @@ -922,13 +922,13 @@ class FactureFournisseur extends Facture * @param date $date_start Date de debut de validite du service * @param date $date_end Date de fin de validite du service * @param string $ventil Code de ventilation comptable - * @param int $Âșinfo_bits Bits de type de lines + * @param int $info_bits Bits de type de lines * @param string $price_base_type HT ou TTC * @param int $type Type of line (0=product, 1=service) * @param int $rang Position of line * @return int >0 if OK, <0 if KO */ - function addline($desc, $pu, $txtva, $txlocaltax1=0, $txlocaltax2=0, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0, $rang=-1) + function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0, $rang=-1) { dol_syslog(get_class($this)."::addline $desc,$pu,$qty,$txtva,$fk_product,$remise_percent,$date_start,$date_end,$ventil,$info_bits,$price_base_type,$type", LOG_DEBUG); include_once(DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'); @@ -988,6 +988,7 @@ class FactureFournisseur extends Facture /** * Update a line detail into database + * * @param int $id Id of line invoice * @param string $label Description of line * @param double $pu Prix unitaire (HT ou TTC selon price_base_type) @@ -1083,7 +1084,9 @@ class FactureFournisseur extends Facture /** * Delete a detail line from database - * @param int $rowid id of line to delete + * + * @param int $rowid Id of line to delete + * @return void */ function deleteline($rowid) { @@ -1103,7 +1106,9 @@ class FactureFournisseur extends Facture /** * Charge les informations d'ordre info dans l'objet facture - * @param int $id Id de la facture a charger + * + * @param int $id Id de la facture a charger + * @return void */ function info($id) { @@ -1146,7 +1151,8 @@ class FactureFournisseur extends Facture /** * Load indicators for dashboard (this->nbtodo and this->nbtodolate) - * @param User $user Objet user + * + * @param User $user Object user * @return int <0 if KO, >0 if OK */ function load_board($user) @@ -1188,10 +1194,10 @@ class FactureFournisseur extends Facture /** * Renvoie nom clicable (avec eventuellement le picto) * - * @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul - * @param string $option Sur quoi pointe le lien - * @param int $max Max length of shown ref - * @return string Chaine avec URL + * @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul + * @param string $option Sur quoi pointe le lien + * @param int $max Max length of shown ref + * @return string Chaine avec URL */ function getNomUrl($withpicto=0,$option='',$max=0) { diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 6c95ef13a40..79650676cc1 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -58,17 +58,18 @@ class PaiementFourn extends Paiement /** * Constructor * - * @param DoliDB $DB Database handler + * @param DoliDB $db Database handler */ - function PaiementFourn($DB) + function PaiementFourn($db) { - $this->db = $DB ; + $this->db = $db; } /** * Load payment object - * @param int $id id paiement to get - * @return int <0 if ko, >0 if ok + * + * @param int $id Id if payment to get + * @return int <0 if ko, >0 if ok */ function fetch($id) { @@ -238,7 +239,7 @@ class PaiementFourn extends Paiement * Supprime un paiement ainsi que les lignes qu'il a genere dans comptes * Si le paiement porte sur un ecriture compte qui est rapprochee, on refuse * Si le paiement porte sur au moins une facture a "payee", on refuse - * + * * @return int <0 si ko, >0 si ok */ function delete() @@ -320,8 +321,10 @@ class PaiementFourn extends Paiement } /** - * Information sur l'objet - * @param int $id id du paiement dont il faut afficher les infos + * Information on object + * + * @param int $id Id du paiement dont il faut afficher les infos + * @return void */ function info($id) { diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 0613ba96248..0c182a7a47d 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005 Eric Seigne * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2010-2011 Juanjo Menent @@ -161,18 +161,18 @@ if ($action == 'addline' && $user->rights->fournisseur->commande->creer) $localtax2_tx= get_localtax($tva_tx, 2, $object->thirdparty); $result=$object->addline( - $desc, - $pu, - $qty, - $tva_tx, - $localtax1_tx, - $localtax2_tx, - $productsupplier->id, - $_POST['idprodfournprice'], - $productsupplier->fourn_ref, - $remise_percent, - 'HT', - $type + $desc, + $pu, + $qty, + $tva_tx, + $localtax1_tx, + $localtax2_tx, + $productsupplier->id, + $_POST['idprodfournprice'], + $productsupplier->fourn_ref, + $remise_percent, + 'HT', + $type ); } if ($idprod == -1) @@ -566,27 +566,32 @@ if ($action=='remove_file') } } - /* * Create an order */ if ($action == 'create') { + $error=0; + $fourn = new Fournisseur($db); $result=$fourn->fetch($socid); + $object->socid = $fourn->id; + $db->begin(); - $orderid=$fourn->create_commande($user); - - if ($orderid > 0) + $orderid=$object->create($user); + if (! $orderid > 0) { - $idc = $fourn->single_open_commande; + $error++; + $mesg=$object->error; + } + if (! $error) + { if ($comclientid != '') { - $fourn->updateFromCommandeClient($user,$idc,$comclientid); - + $object->updateFromCommandeClient($user, $orderid, $comclientid); } $id=$orderid; @@ -596,7 +601,6 @@ if ($action == 'create') else { $db->rollback(); - $mesg=$fourn->error; } } @@ -733,7 +737,7 @@ if ($action == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_P include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); $interface=new Interfaces($db); $result=$interface->run_triggers('ORDER_SUPPLIER_SENTBYMAIL',$object,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } + if ($result < 0) { $error++; $errors=$interface->errors; } // Fin appel triggers if ($error) diff --git a/htdocs/fourn/product/categorie.php b/htdocs/fourn/product/categorie.php index 4517d668176..19afd4576e7 100644 --- a/htdocs/fourn/product/categorie.php +++ b/htdocs/fourn/product/categorie.php @@ -2,6 +2,7 @@ /* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2005 Brice Davoleau * Copyright (C) 2005-2007 Regis Houssin + * Copyright (C) 2012 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 @@ -130,7 +131,7 @@ if ($_GET["id"]) foreach ($cats as $cat) { - $ways = $cat->print_all_ways (); + $ways = $cat->print_all_ways(); foreach ($ways as $way) { $i = !$i; diff --git a/htdocs/fourn/product/index.php b/htdocs/fourn/product/index.php index 9ba722ae578..cf609e20deb 100644 --- a/htdocs/fourn/product/index.php +++ b/htdocs/fourn/product/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2012 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 @@ -99,7 +99,7 @@ $sql = "SELECT p.rowid, p.label, p.price, p.ref, p.type"; $sql .= " FROM ".MAIN_DB_PREFIX."product as p "; $sql .= " WHERE p.fk_product_type <> 1"; $sql .= " ORDER BY p.datec DESC "; -$sql .= $db->plimit(15 ,0); +$sql .= $db->plimit(15, 0); $resql = $db->query($sql); diff --git a/htdocs/fourn/product/liste.php b/htdocs/fourn/product/liste.php index d8ffeaf3f14..89a9e15e96f 100644 --- a/htdocs/fourn/product/liste.php +++ b/htdocs/fourn/product/liste.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2010 Juanjo Menent * @@ -132,7 +132,7 @@ if ($fourn_id > 0) $sql .= " AND ppf.fk_soc = ".$fourn_id; } $sql .= " ORDER BY ".$sortfield." ".$sortorder; -$sql .= $db->plimit($limit + 1 ,$offset); +$sql .= $db->plimit($limit + 1, $offset); dol_syslog("fourn/product/liste: sql=".$sql); @@ -164,7 +164,7 @@ if ($resql) if (isset($catid)) { print "
"; - $c = new Categorie ($db, $catid); + $c = new Categorie($db, $catid); $ways = $c->print_all_ways(' > ','fourn/product/liste.php'); print " > ".$ways[0]."
\n"; print "

"; diff --git a/htdocs/fourn/product/photos.php b/htdocs/fourn/product/photos.php index 9dabfa80407..5e617a2c001 100644 --- a/htdocs/fourn/product/photos.php +++ b/htdocs/fourn/product/photos.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2012 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 @@ -162,7 +162,7 @@ if ($_GET["id"]) print '
'.$langs->trans("File").': '.dol_trunc($filename,16); if ($user->rights->produit->creer || $user->rights->service->creer) { - print '
'.''.img_delete().''; + print '
'.img_delete().''; } if ($nbbyrow) print ''; if ($nbbyrow && ($nbphoto % $nbbyrow == 0)) print '';