X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Faxletter.php;h=ea4d2f4d868a19c911edcbd9f629a0d2bb355c5d;hb=77fcaa3f00dcbba0813a18a4cba0be0f18444e70;hp=805f2388a2cb7175b33e6047b15dd5ebcca2b0f4;hpb=59bec5bc5512a4f962ebac7b0346f59cdf56f901;p=platal.git diff --git a/modules/axletter.php b/modules/axletter.php index 805f238..ea4d2f4 100644 --- a/modules/axletter.php +++ b/modules/axletter.php @@ -24,13 +24,13 @@ class AXLetterModule extends PLModule function handlers() { return array( - 'ax' => $this->make_hook('index', AUTH_COOKIE), + 'ax' => $this->make_hook('index', AUTH_COOKIE), 'ax/out' => $this->make_hook('out', AUTH_PUBLIC), 'ax/show' => $this->make_hook('show', AUTH_COOKIE), 'ax/edit' => $this->make_hook('submit', AUTH_MDP), 'ax/edit/cancel' => $this->make_hook('cancel', AUTH_MDP), 'ax/edit/valid' => $this->make_hook('valid', AUTH_MDP), - 'admin/axletter' => $this->make_hook('admin', AUTH_MDP, 'admin'), + 'admin/axletter' => $this->make_hook('admin', AUTH_MDP, 'admin'), ); } @@ -206,7 +206,7 @@ class AXLetterModule extends PLModule $page->assign('echeance_time', $echeance_time); $page->assign('saved', $saved); $page->assign('new', $new); - $page->assign('is_xorg', S::has_perms()); + $page->assign('is_xorg', S::admin()); if (!$saved) { $select = ''; @@ -324,7 +324,7 @@ class AXLetterModule extends PLModule $importer->apply($page, "admin/axletter", array('user_id', 'email', 'prenom', 'nom', 'promo', 'flag', 'hash')); } - function idFromMail($line, $key) + function idFromMail($line, $key, $relation = null) { static $field; global $globals; @@ -369,7 +369,7 @@ class AXLetterModule extends PLModule return $id ? $id : '0'; } - function createHash($line, $key) + function createHash($line, $key, $relation) { $hash = implode(time(), $line) . rand(); $hash = md5($hash);