-// }}}
-// {{{
-
-global $prf_desc;
-$prf_desc = array('search_names' => 'L\'un de ses noms',
- 'freetext' => 'Le texte libre',
- 'mobile' => 'Son numéro de téléphone portable',
- 'nationalite' => 'Sa nationalité',
- 'nationalite2' => 'Sa seconde nationalité',
- 'nationalite3' => 'Sa troisième nationalité',
- 'nick' => 'Son surnom',
- 'networking' => 'La liste de ses adresses de networking',
- 'edus' => 'Ses formations',
- 'addresses' => 'Ses adresses',
- 'section' => 'Sa section sportive',
- 'binets' => 'La liste de ses binets',
- 'medals' => 'Ses décorations',
- 'cv' => 'Son Curriculum Vitae',
- 'corps' => 'Son Corps d\'État',
- 'jobs' => 'Ses informations professionnelles',
- 'photo' => 'Sa photographie');
-
-function get_profile_change_details($event, $limit) {
- global $prf_desc;
- $res = XDB::iterRow("SELECT field
- FROM watch_profile
- WHERE uid = {?} AND ts > {?}
- ORDER BY ts DESC",
- $event['uid'], $limit);
- if ($res->total() > 0) {
- $data = array();
- while (list($field) = $res->next()) {
- $data[] .= $prf_desc[$field];
- }
- return '<ul><li>' . implode('</li><li>', $data) . '</li></ul>';
+ public static function register(Profile &$profile, $field)
+ {
+ XDB::execute('REPLACE INTO watch_profile (pid, ts, field)
+ VALUES ({?}, NOW(), {?})',
+ $profile->id(), $field);