From 2b6d403c3f3a78286f940919f82e53c4eb80de60 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Mon, 10 Jul 2006 06:53:20 +0000 Subject: [PATCH] compatibility. git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@415 839d8a87-29fc-0310-9880-83ba4fa771e5 --- modules/register.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/register.php b/modules/register.php index 95aeff8..ea29516 100644 --- a/modules/register.php +++ b/modules/register.php @@ -26,6 +26,7 @@ class RegisterModule extends PLModule return array( 'register' => $this->make_hook('register', AUTH_PUBLIC), 'register/end' => $this->make_hook('end', AUTH_PUBLIC), + 'register/end.php' => $this->make_hook('end_old', AUTH_PUBLIC), 'register/success' => $this->make_hook('success', AUTH_MDP), ); } @@ -42,6 +43,11 @@ class RegisterModule extends PLModule $sub_state['step'] = max(0,Get::getInt('back')); } + // Compatibility with old sources, keep it atm + if (!$hash && Env::has('hash')) { + $hash = Env::get('hash'); + } + if ($hash) { $res = $globals->xdb->query( "SELECT m.uid, u.promo, u.nom, u.prenom, u.matricule @@ -151,6 +157,11 @@ class RegisterModule extends PLModule return PL_OK; } + function handler_end_old(&$page) + { + return $this->handler_end($page, Env::get('hash')); + } + function handler_end(&$page, $hash = null) { global $globals; -- 2.1.4