Fix: Checkstyle

This commit is contained in:
Laurent Destailleur 2012-11-19 23:43:14 +01:00
parent d8d1db143f
commit 72608e7a72
2 changed files with 50 additions and 55 deletions

View File

@ -127,8 +127,8 @@ $server->wsdl->addComplexType(
/* /*
* Les photos de la catégorie (un tableau indéxé qui contient les images avec leur vignette) * Les photos de la catégorie (un tableau indéxé qui contient les images avec leur vignette)
*/ */
$server->wsdl->addComplexType( $server->wsdl->addComplexType(
'PhotosArray', 'PhotosArray',
'complexType', 'complexType',
'array', 'array',
'', '',
@ -137,7 +137,7 @@ $server->wsdl->addComplexType(
array( array(
array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:image[]') array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:image[]')
), ),
'' ''
); );
/* /*
@ -249,9 +249,8 @@ function getCategory($authentication,$id)
); );
$cats = $categorie->get_filles(); $cats = $categorie->get_filles();
if (sizeof ($cats) > 0) if (count($cats) > 0)
{ {
foreach($cats as $fille) foreach($cats as $fille)
{ {
$dir = (!empty($conf->categorie->dir_output)?$conf->categorie->dir_output:$conf->service->dir_output); $dir = (!empty($conf->categorie->dir_output)?$conf->categorie->dir_output:$conf->service->dir_output);

View File

@ -622,50 +622,46 @@ function getProductsForCategory($authentication,$id)
$res = $db->query($sql); $res = $db->query($sql);
if ($res) if ($res)
{ {
while ($rec = $db->fetch_array($res))
while ($rec = $db->fetch_array ($res))
{ {
$obj = new Product ($db); $obj = new Product($db);
$obj->fetch ($rec['fk_'.$field]); $obj->fetch($rec['fk_'.$field]);
if($obj->status > 0 ) { if($obj->status > 0 )
{
$dir = (!empty($conf->product->dir_output)?$conf->product->dir_output:$conf->service->dir_output); $dir = (!empty($conf->product->dir_output)?$conf->product->dir_output:$conf->service->dir_output);
$pdir = get_exdir($obj->id,2) . $obj->id ."/photos/"; $pdir = get_exdir($obj->id,2) . $obj->id ."/photos/";
$dir = $dir . '/'. $pdir; $dir = $dir . '/'. $pdir;
$products[] = array( $products[] = array(
'id' => $obj->id,
'ref' => $obj->ref,
'ref_ext' => $obj->ref_ext,
'label' => $obj->label,
'description' => $obj->description,
'date_creation' => dol_print_date($obj->date_creation,'dayhourrfc'),
'date_modification' => dol_print_date($obj->date_modification,'dayhourrfc'),
'note' => $obj->note,
'status_tosell' => $obj->status,
'status_tobuy' => $obj->status_buy,
'type' => $obj->type,
'barcode' => $obj->barcode,
'barcode_type' => $obj->barcode_type,
'country_id' => $obj->country_id>0?$obj->country_id:'',
'country_code' => $obj->country_code,
'custom_code' => $obj->customcode,
'id' => $obj->id, 'price_net' => $obj->price,
'ref' => $obj->ref, 'price' => ($obj->price_ttc-$obj->price),
'ref_ext' => $obj->ref_ext, 'vat_rate' => $obj->tva_tx,
'label' => $obj->label, 'price_ttc' => $obj->price_ttc,
'description' => $obj->description, 'price_base_type' => $obj->price_base_type,
'date_creation' => dol_print_date($obj->date_creation,'dayhourrfc'),
'date_modification' => dol_print_date($obj->date_modification,'dayhourrfc'),
'note' => $obj->note,
'status_tosell' => $obj->status,
'status_tobuy' => $obj->status_buy,
'type' => $obj->type,
'barcode' => $obj->barcode,
'barcode_type' => $obj->barcode_type,
'country_id' => $obj->country_id>0?$obj->country_id:'',
'country_code' => $obj->country_code,
'custom_code' => $obj->customcode,
'price_net' => $obj->price,
'price' => ($obj->price_ttc-$obj->price),
'vat_rate' => $obj->tva_tx,
'price_ttc' => $obj->price_ttc,
'price_base_type' => $obj->price_base_type,
'stock_real' => $obj->stock_reel,
'stock_alert' => $obj->seuil_stock_alerte,
'pmp' => $obj->pmp,
'import_key' => $obj->import_key,
'dir' => $pdir,
'photos' => $obj->liste_photos($dir,$nbmax=10)
'stock_real' => $obj->stock_reel,
'stock_alert' => $obj->seuil_stock_alerte,
'pmp' => $obj->pmp,
'import_key' => $obj->import_key,
'dir' => $pdir,
'photos' => $obj->liste_photos($dir,$nbmax=10)
); );
} }