Merge branch 'platal-0.10.2'
[platal.git] / include / validations / entreprises.inc.php
index 6d269d8..6becf7a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2009 Polytechnique.org                              *
+ *  Copyright (C) 2003-2010 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -164,7 +164,7 @@ class EntrReq extends Validate
             $jobid = XDB::insertId();
             $display_tel = format_display_number($this->tel, $error_tel);
             $display_fax = format_display_number($this->fax, $error_fax);
-            XDB::execute("INSERT INTO  profile_phones (uid, link_type, link_id, tel_id, tel_type,
+            XDB::execute("INSERT INTO  profile_phones (pid, link_type, link_id, tel_id, tel_type,
                                        search_tel, display_tel, pub)
                                VALUES  ({?}, 'hq', 0, 0, 'fixed', {?}, {?}, 'public'),
                                        ({?}, 'hq', 0, 1, 'fax', {?}, {?}, 'public')",
@@ -195,8 +195,8 @@ class EntrReq extends Validate
         }
         return XDB::execute('UPDATE  profile_job
                                 SET  jobid = {?}
-                              WHERE  uid = {?} AND id = {?}',
-                            $jobid, $this->user->id(), $this->id);
+                              WHERE  pid = {?} AND id = {?}',
+                            $jobid, $this->user->profile()->id(), $this->id);
     }
 
     // }}}