Updates education and adapts AX data to merge them into Xorg data (Closes #891).
[platal.git] / modules / xnetevents.php
index 071ea7d..91aa302 100644 (file)
@@ -183,9 +183,18 @@ class XnetEventsModule extends PLModule
         $page->changeTpl('xnetevents/subscribe.tpl');
 
         $evt = get_event_detail($eid);
-        if (!$evt) {
+        if (is_null($evt)) {
             return PL_NOT_FOUND;
         }
+        if ($evt === false) {
+            global $globals, $platal;
+            $url = $globals->asso('sub_url');
+            if (empty($url)) {
+                $url = $platal->ns . 'subscribe';
+            }
+            $page->kill('Cet événement est reservé aux membres du groupe ' . $globals->asso('nom') .
+                        '. Pour devenir membre, rends-toi sur la page de <a href="' . $url . '">demande d\'inscripton</a>.');
+        }
 
         if (!$evt['inscr_open']) {
             $page->kill('Les inscriptions pour cet événement sont closes');