X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fsynchro_ax.inc.php;h=3648e5476a751424d7305cc65537094ce6b94459;hb=493b6abebf3d6c35691f66fd1bfdc063efaab576;hp=ab0c8b66e4fd3f8496244402f9430549e7c9eb40;hpb=33ae80b59e0231b8fb6fa34cbe600078383b52a8;p=platal.git diff --git a/include/synchro_ax.inc.php b/include/synchro_ax.inc.php index ab0c8b6..3648e54 100644 --- a/include/synchro_ax.inc.php +++ b/include/synchro_ax.inc.php @@ -1,6 +1,6 @@ webservice->private_key_ax || !is_file($globals->webservice->private_key_ax); + return !isset($globals->webservice->private_key_ax) || !is_file($globals->webservice->private_key_ax); } function get_user_ax($matricule_ax, $raw=false) { require_once('webservices/ax/client.inc'); - global $globals; - $ancien = recupere_infos_ancien($matricule_ax); $userax = Array(); @@ -47,7 +45,7 @@ function get_user_ax($matricule_ax, $raw=false) $userax['sexe'] = ($ancien->Civilite() != 'M')?1:0; $userax['promo'] = $ancien->Promo(); /* $userax['nationalite'] = $ancien->Nationalite(); - if ($userax['nationalite'] == 'F') $userax['nationalite'] = 'Français'; */ + if ($userax['nationalite'] == 'F') $userax['nationalite'] = 'Français'; */ //$userax['date'] = substr($ancien[12], 0, 10); $userax['mobile'] = trim($ancien->Mobile(0)); /* if ($ancien->Corps() == 'D' || $ancien->Corps() == 'Z') { @@ -95,7 +93,7 @@ function get_user_ax($matricule_ax, $raw=false) if ($ancien->Tel($i) || $ancien->Fax($i)) { $adrax['tels'] = array(); if ($tel = $ancien->Tel($i)) - $adrax['tels'][] = array('tel' => $tel, 'tel_type' => 'Tél.', 'tel_pub' => 'ax'); + $adrax['tels'][] = array('tel' => $tel, 'tel_type' => 'Tél.', 'tel_pub' => 'ax'); if ($tel = $ancien->Fax($i)) $adrax['tels'][] = array('tel' => $tel, 'tel_type' => 'Fax', 'tel_pub' => 'ax'); } @@ -119,5 +117,5 @@ function ax_synchronize($login, $uid) { $diff = diff_user_details($userax, $user, 'ax'); set_user_details($user['user_id'], $diff); } -// vim:set et sw=4 sts=4 sws=4: +// vim:set et sw=4 sts=4 sws=4 enc=utf-8: ?>