X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fprofile%2Fjobs.inc.php;h=ad1e921f6d4edeb5aafa73119d19b02cb089984d;hb=f70f2bcdc077c220e40ecebaf569e097f6028743;hp=64b96b63841a37004c80293fd701863cb1b40930;hpb=7c2e0f0db1940d4d52d282ddd06d22706ee35a54;p=platal.git diff --git a/modules/profile/jobs.inc.php b/modules/profile/jobs.inc.php index 64b96b6..ad1e921 100644 --- a/modules/profile/jobs.inc.php +++ b/modules/profile/jobs.inc.php @@ -1,6 +1,6 @@ settings['cv'] = null; $this->settings['jobs'] = new ProfileJob(); + $this->watched['cv'] = $this->watched['jobs'] = true; } protected function _fetchData() @@ -145,9 +149,10 @@ class ProfileJobs extends ProfilePage e.country, gp.pays, gp.display, FIND_IN_SET('geoloc', flags), e.tel, e.fax, e.mobile, e.email, e.web, e.pub, - e.adr_pub, e.tel_pub, e.email_pub + e.adr_pub, e.tel_pub, e.email_pub, + e.glat AS precise_lat, e.glng AS precise_lon FROM entreprises AS e - INNER JOIN geoloc_pays AS gp ON(gp.a2 = e.country) + LEFT JOIN geoloc_pays AS gp ON(gp.a2 = e.country) WHERE uid = {?} AND entreprise != '' ORDER BY entrid", S::i('uid')); $this->values['jobs'] = array(); @@ -155,7 +160,7 @@ class ProfileJobs extends ProfilePage $adr1, $adr2, $adr3, $postcode, $city, $cityid, $region, $regiontxt, $country, $countrytxt, $display, $checked, $tel, $fax, $mobile, $email, $web, - $pub, $adr_pub, $tel_pub, $email_pub) = $res->next()) { + $pub, $adr_pub, $tel_pub, $email_pub, $glat, $glng) = $res->next()) { $this->values['jobs'][] = array('name' => $name, 'secteur' => $secteur, 'ss_secteur' => $ss_secteur, @@ -173,14 +178,15 @@ class ProfileJobs extends ProfilePage 'countrytxt' => $countrytxt, 'display' => $display, 'pub' => $adr_pub, - 'checked' => $checked), + 'checked' => $checked, + 'precise_lat'=> $glat, + 'precise_lon'=> $glng), 'tel' => $tel, 'fax' => $fax, 'mobile' => $mobile, 'email' => $email, 'web' => $web, 'pub' => $pub, - 'adr_pub' => $adr_pub, 'tel_pub' => $tel_pub, 'email_pub' => $email_pub); } @@ -196,7 +202,7 @@ class ProfileJobs extends ProfilePage } } - public function _prepare(PlatalPage &$page, $id) + public function _prepare(PlPage &$page, $id) { $page->assign('secteurs', XDB::iterator("SELECT id, label FROM emploi_secteur"));