/[dolibarr]/dolibarr/htdocs/societe.class.php
ViewVC logotype

Diff of /dolibarr/htdocs/societe.class.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.103 by eldy, Wed Nov 23 00:22:47 2005 UTC revision 1.104 by eldy, Wed Nov 30 23:21:42 2005 UTC
# Line 128  class Societe { Line 128  class Societe {
128      {      {
129          global $langs,$conf;          global $langs,$conf;
130    
131            // Nettoyage paramètres
132          $this->nom=trim($this->nom);          $this->nom=trim($this->nom);
133    
134            dolibarr_syslog("societe.class.php::create ".$this->nom);
135    
136          $this->db->begin();          $this->db->begin();
137    
138          $result = $this->verify();          $result = $this->verify();
# Line 148  class Societe { Line 151  class Societe {
151    
152                  $ret = $this->update($this->id,$user,0);                  $ret = $this->update($this->id,$user,0);
153    
154                  if ($ret == 0)                  if ($ret > 0)
155                  {                  {
156                      $this->use_webcal=($conf->global->PHPWEBCALENDAR_COMPANYCREATE=='always'?1:0);                      $this->use_webcal=($conf->global->PHPWEBCALENDAR_COMPANYCREATE=='always'?1:0);
157    
# Line 173  class Societe { Line 176  class Societe {
176              else              else
177    
178              {              {
179                  if ($this->db->errno() == DB_ERROR_RECORD_ALREADY_EXISTS)                  if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
180                  {                  {
181    
182                      $this->error=$langs->trans("ErrorCompanyNameAlreadyExists",$this->nom);                      $this->error=$langs->trans("ErrorCompanyNameAlreadyExists",$this->nom);
# Line 249  class Societe { Line 252  class Societe {
252       *      \param      id              id societe       *      \param      id              id societe
253       *      \param      user            Utilisateur qui demande la mise à jour       *      \param      user            Utilisateur qui demande la mise à jour
254       *      \param      call_trigger    0=non, 1=oui       *      \param      call_trigger    0=non, 1=oui
255       *      \return     int             0 si ok, < 0 si erreur       *      \return     int             <0 si ko, >0 si erreur
256       */       */
257      function update($id, $user='', $call_trigger=1)      function update($id, $user='', $call_trigger=1)
258      {      {

Legend:
Removed from v.1.103  
changed lines
  Added in v.1.104

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26