X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fprofile%2Fjobs.inc.php;h=06c74b509f6552a3dffa492a2a9f4947ab39d8d0;hb=5b2c99878fc75a6acffb2239e284f2cb1782142c;hp=a56a6bb7ae604a7d603f8ef76b8a20b9172fae27;hpb=a93519575833e6886e055abb8b43b3ada6f163bc;p=platal.git diff --git a/modules/profile/jobs.inc.php b/modules/profile/jobs.inc.php index a56a6bb..06c74b5 100644 --- a/modules/profile/jobs.inc.php +++ b/modules/profile/jobs.inc.php @@ -193,9 +193,9 @@ class ProfileJobs extends ProfilePage { // Checkout the CV $res = XDB::query("SELECT cv - FROM auth_user_md5 - WHERE user_id = {?}", - S::i('uid')); + FROM profiles + WHERE pid = {?}", + $this->pid()); $this->values['cv'] = $res->fetchOneCell(); // Checkout the corps @@ -203,7 +203,7 @@ class ProfileJobs extends ProfilePage rankid AS rank, corps_pub AS pub FROM profile_corps WHERE uid = {?}", - S::i('uid')); + $this->pid()); $this->values['corps'] = $res->fetchOneAssoc(); // Build the jobs tree @@ -220,7 +220,7 @@ class ProfileJobs extends ProfilePage LEFT JOIN geoloc_countries AS gc ON (gc.iso_3166_1_a2 = e.country) LEFT JOIN profile_job_subsubsector_enum AS s ON (s.id = j.subsubsectorid) WHERE j.uid = {?} - ORDER BY entrid", S::i('uid')); + ORDER BY entrid", $this->pid()); $this->values['jobs'] = array(); while (list($id, $name, $function, $secteur, $ss_secteur, $sss_secteur, $description, $w_adr1, $w_adr2, $w_adr3, $w_postcode, $w_city, $w_cityid, @@ -260,7 +260,7 @@ class ProfileJobs extends ProfilePage FROM profile_phones WHERE uid = {?} AND link_type = 'pro' ORDER BY link_id", - S::i('uid')); + $this->pid()); $i = 0; $jobNb = count($this->values['jobs']); while ($tel = $res->next()) { @@ -291,10 +291,10 @@ class ProfileJobs extends ProfilePage protected function _saveData() { if ($this->changed['cv']) { - XDB::execute("UPDATE auth_user_md5 + XDB::execute("UPDATE profiles SET cv = {?} - WHERE user_id = {?}", - $this->values['cv'], S::i('uid')); + WHERE pid = {?}", + $this->values['cv'], $this->pid()); } if ($this->changed['corps']) { @@ -303,14 +303,14 @@ class ProfileJobs extends ProfilePage rankid = {?}, corps_pub = {?} WHERE uid = {?}", $this->values['corps']['original'], $this->values['corps']['current'], - $this->values['corps']['rank'], $this->values['corps']['pub'], S::i('uid')); + $this->values['corps']['rank'], $this->values['corps']['pub'], $this->pid()); } } public function _prepare(PlPage &$page, $id) { require_once "emails.combobox.inc.php"; - fill_email_combobox($page); + fill_email_combobox($page, $this->owner, $this->profile); $res = XDB::query("SELECT id, name AS label FROM profile_job_sector_enum");