dolibarr-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-dev] interface Dolibarr OSC


From: Jean
Subject: [Dolibarr-dev] interface Dolibarr OSC
Date: Thu, 14 Jun 2007 17:47:16 -1000
User-agent: Debian Thunderbird 1.0.2 (X11/20070113)

Ajout d'une méthode add_photo_web pour importer la photo d'un produit en vente sur site OSC.

Clone de la méthode add_photo, pour suivre la même méthode et passer par les contrôles prévus.


5a6
>  * Copyright (C) 2007         Jean Heimburger         <address@hidden>
2313c2314
<   
---
> 
2329a2331,2362
>   /**
>    *    \brief      Déplace fichier récupéré sur internet (utilisé pour 
> interface avec OSC)
>    *    \param      sdir        Répertoire destination finale
>    *    \param      $files      url de l'image
>    *          Jean Heimburger         juin 2007
>    */
>   function add_photo_web($sdir, $files)
>   {
>     $dir = $sdir .'/'. get_exdir($this->id,2) . $this->id ."/";
>     $dir .= "photos/";
> 
>     if (! file_exists($dir))
>       {
>       dolibarr_syslog("Product Create $dir");
>       create_exdir($dir);
>       }
>   
>     if (file_exists($dir))
>     {
>       // Crée fichier en taille vignette
>       // \todo A faire
>       
>       // Crée fichier en taille origine
>                       $content = file_get_contents($files);
>                       
>                       $nom = basename($files);
>                       $im = fopen($dir.$nom,'wb');
>                       fwrite($im, $content);
>                       fclose($im);    
> //            }
>     }
>   }

Attachment: jean.vcf
Description: Vcard


reply via email to

[Prev in Thread] Current Thread [Next in Thread]