<?php
/***************************************************************************
- * Copyright (C) 2003-2004 Polytechnique.org *
+ * Copyright (C) 2003-2006 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
// 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'))
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();
}