compatibility.
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 10 Jul 2006 06:53:20 +0000 (06:53 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 10 Jul 2006 06:53:20 +0000 (06:53 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@415 839d8a87-29fc-0310-9880-83ba4fa771e5

modules/register.php

index 95aeff8..ea29516 100644 (file)
@@ -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;