'admin/postfix/whitelist' => $this->make_hook('postfix_whitelist', AUTH_MDP, 'admin'),
'admin/mx/broken' => $this->make_hook('mx_broken', AUTH_MDP, 'admin'),
'admin/skins' => $this->make_hook('skins', AUTH_MDP, 'admin'),
- 'admin/synchro_ax' => $this->make_hook('synchro_ax', AUTH_MDP, 'admin'),
'admin/user' => $this->make_hook('user', AUTH_MDP, 'admin'),
'admin/add_accounts' => $this->make_hook('add_accounts', AUTH_MDP, 'admin'),
'admin/validate' => $this->make_hook('validate', AUTH_MDP, 'admin'),
private static function getHrid($firstname, $lastname, $promo)
{
if ($firstname != null && $lastname != null && $promo != null) {
- return User::makeForlife($firstname, $lastname, $promo);
+ return User::makeHrid($firstname, $lastname, $promo);
}
return null;
}
XDB::execute("UPDATE aliases
SET type = 'homonyme', expire=NOW()
WHERE alias = {?}", $loginbis);
- XDB::execute("REPLACE INTO homonymes (homonyme_id,user_id)
+ XDB::execute("REPLACE INTO homonyms (homonyme_id,user_id)
VALUES ({?}, {?})", $target, $target);
send_robot_homonyme($user, $loginbis);
$op = 'list';
IF(h.homonyme_id = s.id, a.type, NULL) AS type,
ac.uid AS user_id
FROM aliases AS a
- LEFT JOIN homonymes AS h ON (h.homonyme_id = a.id)
+ LEFT JOIN homonyms AS h ON (h.homonyme_id = a.id)
INNER JOIN aliases AS s ON (s.id = h.user_id AND s.type='a_vie')
INNER JOIN accounts AS ac ON (ac.uid = a.id)
WHERE a.type = 'homonyme' OR a.expire != ''
{
$page->setTitle('Administration - Coupures');
$page->assign('title', 'Gestion des coupures');
- $table_editor = new PLTableEditor('admin/downtime','coupures','id');
+ $table_editor = new PLTableEditor('admin/downtime','downtimes','id');
$table_editor->describe('debut','date',true);
$table_editor->describe('duree','durée',false);
$table_editor->describe('resume','résumé',true);
$selectedJob = Env::has('selectedJob');
XDB::execute("DELETE FROM profile_phones
- WHERE uid = {?} AND link_type = 'hq'",
+ WHERE pid = {?} AND link_type = 'hq'",
$id);
XDB::execute("DELETE FROM profile_addresses
WHERE jobid = {?} AND type = 'hq'",
Env::t('name'), Env::t('acronym'), Env::t('url'), Env::t('email'),
Env::t('NAF_code'), Env::i('AX_code'), Env::i('holdingId'), $id);
- XDB::execute("INSERT INTO profile_phones (uid, link_type, link_id, tel_id, tel_type,
+ XDB::execute("INSERT INTO profile_phones (pid, link_type, link_id, tel_id, tel_type,
search_tel, display_tel, pub)
VALUES ({?}, 'hq', 0, 0, 'fixed', {?}, {?}, 'public'),
({?}, 'hq', 0, 1, 'fax', {?}, {?}, 'public')",
t.display_tel AS tel, f.display_tel AS fax, a.text AS address
FROM profile_job_enum AS e
LEFT JOIN profile_job_enum AS h ON (e.holdingid = h.id)
- LEFT JOIN profile_phones AS t ON (t.uid = e.id AND link_type = 'hq' AND tel_id = 0)
- LEFT JOIN profile_phones AS f ON (f.uid = e.id AND link_type = 'hq' AND tel_id = 1)
+ LEFT JOIN profile_phones AS t ON (t.pid = e.id AND link_type = 'hq' AND tel_id = 0)
+ LEFT JOIN profile_phones AS f ON (f.pid = e.id AND link_type = 'hq' AND tel_id = 1)
LEFT JOIN profile_addresses AS a ON (a.jobid = e.id AND a.type = 'hq')
WHERE e.id = {?}",
$id);