X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=scripts%2Fwebredirect.php;h=f834e07b8df93c042af5b833a86b8d7506b0ae98;hb=5b4598828acca724080fb36c1f13b30e95b7e891;hp=e1124769adba81b27f23c745b1d0e4e6523b5d32;hpb=50a40a33a496131e817df875607ea5542d096a64;p=platal.git diff --git a/scripts/webredirect.php b/scripts/webredirect.php index e112476..f834e07 100644 --- a/scripts/webredirect.php +++ b/scripts/webredirect.php @@ -26,7 +26,7 @@ require("../include/xorg.inc.php"); // la config d'apache impose la forme suivante pour REQUEST_URI : // REQUEST_URI = /prenom.nom(/path/fichier.hmtl)? list($username, $path) = preg_split('/\//', $_SERVER["REQUEST_URI"], 2, PREG_SPLIT_NO_EMPTY); -$res = $globals->xdb->query( +$res = XDB::query( "SELECT redirecturl FROM auth_user_quick AS a INNER JOIN aliases AS al ON (al.id = a.user_id AND (al.type='a_vie' OR al.type='alias')) @@ -35,9 +35,9 @@ $res = $globals->xdb->query( if ($url = $res->fetchOneCell()) { $url = preg_replace('@/+$@', '', $url); if($path) { - redirect("http://$url/$path"); + http_redirect("http://$url/$path"); } else { - redirect("http://$url"); + http_redirect("http://$url"); } exit(); }