<?php
/***************************************************************************
- * Copyright (C) 2003-2007 Polytechnique.org *
+ * Copyright (C) 2003-2008 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
$this->settings['countries'] = new ProfileCountry();
}
- protected function fetchData()
+ protected function _fetchData()
{
- if (count($this->orig) > 0) {
- $this->values = $this->orig;
- return;
- }
$res = XDB::query("SELECT expertise
FROM mentor
WHERE uid = {?}",
S::i('uid'));
- $this->value['expertise'] = $res->fetchOneCell();
- parent::fetchData();
+ $this->values['expertise'] = $res->fetchOneCell();
}
- protected function saveData()
+ protected function _saveData()
{
- parent::saveData();
if ($this->changed['expertise']) {
XDB::execute("REPLACE INTO mentor (uid, expertise)
VALUES ({?}, {?})",
}
}
- public function prepare(PlatalPage &$page)
+ public function _prepare(PlatalPage &$page, $id)
{
- parent::prepare($page);
$page->assign('secteurs_sel', XDB::iterator("SELECT id, label
FROM emploi_secteur"));
}