{
// 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
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
LEFT JOIN profile_addresses AS ah ON (ah.jobid = j.jobid AND ah.type = 'hq')
WHERE j.uid = {?}
ORDER BY j.id",
- S::i('uid'));
+ $this->pid());
$this->values['jobs'] = array();
while (list($id, $jobid, $name, $sector, $subSector, $subSubSector,
$subSubSectorName, $description, $w_email, $w_emailPub, $w_url, $pub,
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 ($phone = $res->next()) {
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']) {
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");