]> _ Git - cubeextranet.git/commitdiff
fix #3938 @0.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 8 Oct 2020 10:26:06 +0000 (10:26 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 8 Oct 2020 10:26:06 +0000 (10:26 +0000)
inc/commons/DAO/class.common.dao.entreprise.php
inc/commons/DAO/class.common.dao.utilisateur.php
inc/commons/class.common.core.php
inc/extranet/Controlleur/class.extranet.ajax.php
inc/extranet/Controlleur/class.extranet.url.php

index cac60307898fb3c65c26676ce883b84b5160a45a..fb56860df455d9dcb10e61223abc738088e99de8 100644 (file)
@@ -183,8 +183,7 @@ class commonDAOEntreprise extends commonDAO
         }
         $core->refreshWSUsersTree();
 
-        $entreprise = $this->selectById($entreprise_id);
-        return $entreprise;
+        return $this->selectById($entreprise_id);
     }
 
     public function setWSAdmin($entreprise_id, $admin_id)
index 42bbfd1e01f2d8062092a7e536db50f8a410baec..f10ff50e742116c7cdfc853e3f3de818b7f82045 100644 (file)
@@ -245,7 +245,6 @@ class commonDAOUtilisateur extends commonDAO
         $c->address = json_encode(['address' => $data['adresse'], 'postcode' => $data['code_postal'], 'country' => $data['pays'], 'city' => $data['ville']]);\r
         $c->phone = $data['telephone'];\r
         $c->e1_mobile = $data['mobile'];\r
-        $c->e1_fax = $data['fax'];\r
         $c->locale = $data['lang'];\r
         $c->company = $data['entreprise'];\r
         if ($data['grade'] > 0) {\r
index e90ac8f9c4277eb9f69594bcb55d7e60d3958a85..4518d23734b581a27996a30e62376a5826825883 100644 (file)
@@ -717,8 +717,10 @@ LEFT JOIN e2_u a ON ri.administrateur_id=a.utilisateur_id');
 \r
     public function refreshWSUsersTree()\r
     {\r
-        $t = new wsUsersTree($this->con);\r
-        $t->refreshWSUsersTree();\r
+        if (class_exists('wsUsersTree', true)) {\r
+            $t = new wsUsersTree($this->con);\r
+            $t->refreshWSUsersTree();\r
+        }\r
     }\r
 \r
     public function loadExtranetClasses()\r
index dfcd3958613c6324b6fdf037122458550995ca25..d8a62c79a9529499866e9606c4db831d957907ce 100644 (file)
@@ -30,7 +30,7 @@ class extranetAjax {
                global $core;\r
                $dao = new commonDAOEntreprise($core->con);\r
                $entreprise = $dao->sauve($_POST);\r
-               if ($_POST['entreprise_id'] == 'new') {\r
+               if ($_POST['entreprise_id'] === 'new') {\r
                        $data = $_POST['contact'];\r
                        $data['entreprise'] = $entreprise->entreprise_id;\r
                        $data['utilisateur_id'] = 'new';\r
@@ -44,8 +44,6 @@ class extranetAjax {
                        try {\r
                                $daoClient->sauve($data);\r
                        } catch (exception $e) {\r
-                               fb($e);\r
-                               $dao->supprime($entreprise->entreprise_id);\r
                        }\r
                }\r
 \r
index b4b705331a258cdd82a16082d833bec27173934b..b6653d3d0bf87b5534516c10a77b5231f92c7e16 100644 (file)
@@ -193,12 +193,10 @@ class extranetUrl
             $contact = $daoContact->cree();
             $res .= '<tr><th colspan="2" class="light"><strong>' . __('Contact') . '</strong></th></tr>';
             $res .= '<tr><td>' . __('Adresse e-mail') . '</td><td>' . form::field(array('contact[email]'), 30, 128, $contact->email) . '</td></tr>';
-            $res .= '<tr><td>' . __('Mot de passe') . '</td><td>' . form::field(array('contact[password]'), 30, 128, $contact->password) . '</td></tr>';
             $res .= '<tr><td>' . __('Prénom') . '</td><td>' . form::field(array('contact[prenom]'), 30, 128, $contact->prenom) . '</td></tr>';
             $res .= '<tr><td>' . __('Nom') . '</td><td>' . form::field(array('contact[nom]'), 30, 128, $contact->nom) . '</td></tr>';
             $res .= '<tr><td>' . __('Téléphone') . '</td><td>' . form::field(array('contact[telephone]'), 20, 128, $contact->telephone) . '</td></tr>';
             $res .= '<tr><td>' . __('Mobile') . '</td><td>' . form::field(array('contact[mobile]'), 20, 128, $contact->mobile) . '</td></tr>';
-            $res .= '<tr><td>' . __('Fax') . '</td><td>' . form::field(array('contact[fax]'), 20, 128, $contact->fax) . '</td></tr>';
             $res .= '<tr><td>' . __('Langue') . '</td><td>' . form::combo(array('contact[lang]'), cubeLang::getAvailableLangs(true), $contact->lang) . '</td></tr>';
         }
         return $res;