Fix HTTP redirect when changing rights on polytechnique.net and Referer header is...
authorNicolas Iooss <nicolas.iooss_git@polytechnique.org>
Sat, 8 Mar 2014 15:10:59 +0000 (16:10 +0100)
committerNicolas Iooss <nicolas.iooss_git@polytechnique.org>
Sat, 8 Mar 2014 15:12:09 +0000 (16:12 +0100)
modules/xnetgrp.php

index 0a40bae..53ebb12 100644 (file)
@@ -920,7 +920,11 @@ class XnetGrpModule extends PLModule
                 break;
             }
         }
-        http_redirect($_SERVER['HTTP_REFERER']);
+        if (!empty($_SERVER['HTTP_REFERER'])) {
+            http_redirect($_SERVER['HTTP_REFERER']);
+        } else {
+            pl_redirect('');
+        }
     }
 
     function handler_admin_annuaire($page)