Ver código fonte

website update : setup priorities for contact point addresses

Olivier Massot 6 meses atrás
pai
commit
259feb4f5c
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      ot_admin/Classes/Controller/SiteController.php

+ 2 - 2
ot_admin/Classes/Controller/SiteController.php

@@ -2187,8 +2187,8 @@ class SiteController extends ActionController
                           FROM opentalent.ContactPoint c
                             INNER JOIN opentalent.organization_contactpoint o 
                             ON o.contactPoint_id = c.id
-                          WHERE c.contactType = 'PRINCIPAL' 
-                            AND o.organization_id = " . $organizationId . ";"
+                          WHERE o.organization_id = " . $organizationId . "
+                          ORDER BY FIELD(c.contactType, 'CONTACT', 'PRINCIPAL', 'BILL', 'OTHER');"
         );
         $stmt->setFetchMode(PDO::FETCH_ASSOC);
         $data['email'] = $stmt->fetch()['email'];