X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fprofile%2Fskills.inc.php;h=668cbb32791cbf6aaa32924191df92baaa3f766b;hb=d1e6167749fdad08c81e23d09e1bbbf76e3b989b;hp=a922fc0da3016bfeeaa581ba09955f224344e068;hpb=be6ab042d1dc34d9e42557281b48dd8da400231b;p=platal.git diff --git a/modules/profile/skills.inc.php b/modules/profile/skills.inc.php index a922fc0..668cbb3 100644 --- a/modules/profile/skills.inc.php +++ b/modules/profile/skills.inc.php @@ -1,6 +1,6 @@ table}_def AS s INNER JOIN {$this->table}_ins AS i ON(s.id = i.{$this->skill_field}) WHERE i.uid = {?}", - S::i('uid')); + $page->pid()); while (list($sid, $text, $level) = $res->next()) { $value[$sid] = array('text' => $text, 'level' => $level); } @@ -66,14 +66,14 @@ class ProfileSkill implements ProfileSetting { XDB::execute("DELETE FROM {$this->table}_ins WHERE uid = {?}", - S::i('uid')); + $page->pid()); if (!count($value)) { return; } foreach ($value as $id=>&$skill) { XDB::execute("INSERT INTO {$this->table}_ins (uid, {$this->skill_field}, level) VALUES ({?}, {?}, {?})", - S::i('uid'), $id, $skill['level']); + $page->pid(), $id, $skill['level']); } } } @@ -89,9 +89,8 @@ class ProfileSkills extends ProfilePage $this->settings['langues'] = new ProfileSkill('langues', 'lid', 'langue_fr'); } - public function prepare(PlatalPage &$page) + public function _prepare(PlPage &$page, $id) { - parent::prepare($page); $page->assign('comp_list', XDB::iterator("SELECT id, text_fr, FIND_IN_SET('titre',flags) AS title FROM competences_def")); $page->assign('comp_level', array('initié' => 'initié',