backport carva
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Fri, 11 Mar 2005 22:30:36 +0000 (22:30 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:28:20 +0000 (23:28 +0200)
Patches applied:

 * opensource@polytechnique.org--2005/platal--release--0.9.4--patch-44
   fix carva

git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-514

scripts/webredirect.php

index dac46bb..13f81d1 100644 (file)
@@ -34,7 +34,11 @@ $res = $globals->xdb->query(
 
 if ($url = $res->fetchOneCell()) {
     $url = preg_replace('@/+$@', '', $url);
-    header("Location: http://$url/$path");
+    if($path) {
+        header("Location: http://$url/$path");
+    } else {
+        header("Location: http://$url");
+    }
     exit();
 }