Also displays entreprise name on profile, minifiche... when awaiting validation.
authorStéphane Jacob <sj@m4x.org>
Sat, 3 Jul 2010 16:19:09 +0000 (18:19 +0200)
committerStéphane Jacob <sj@m4x.org>
Sat, 3 Jul 2010 16:19:09 +0000 (18:19 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
include/profilefields.inc.php

index 83f3fb0..9fe2552 100644 (file)
@@ -281,6 +281,11 @@ class Job
             $this->$key = $val;
         }
         $this->company = CompanyList::get($this->jobid);
+        if (is_null($this->company)) {
+            require_once 'validations.inc.php';
+            $entreprise = ProfileValidate::get_typed_requests($this->pid, 'entreprise');
+            $this->company = new Company(array('name' =>  $entreprise[$this->id]->name));
+        }
     }
 
     public function phones()