Commit cf6acc9b authored by mbriand's avatar mbriand
Browse files

Galaxy : affichage des surnoms quand c'est possible (à la place des alias)

parent f19d0c21
...@@ -71,14 +71,17 @@ if ( $_REQUEST["action"] == "area_image" || $_REQUEST["action"] == "area_html" ...@@ -71,14 +71,17 @@ if ( $_REQUEST["action"] == "area_image" || $_REQUEST["action"] == "area_html"
} }
} }
if ( isset($_SERVER['HTTP_IF_NONE_MATCH']) ) { if ( $etag == str_replace('"', '',stripslashes($_SERVER['HTTP_IF_NONE_MATCH'])) ) if ( isset($_SERVER['HTTP_IF_NONE_MATCH']) )
{
if ( $etag == str_replace('"', '',stripslashes($_SERVER['HTTP_IF_NONE_MATCH'])) )
{ {
header("HTTP/1.0 304 Not Modified"); header("HTTP/1.0 304 Not Modified");
header('ETag: "'.$etag.'"'); header('ETag: "'.$etag.'"');
exit(); exit();
} }
} }
header("Cache-Control: must-revalidate"); header("Pragma: cache"); header("Cache-Control: must-revalidate");
header("Pragma: cache");
header("Last-Modified: ".$lastModified); header("Last-Modified: ".$lastModified);
header("Cache-Control: public"); header("Cache-Control: public");
header('ETag: "'.$etag.'"'); header('ETag: "'.$etag.'"');
...@@ -270,17 +273,19 @@ $cts->puts("<div class=\"viewer\" id=\"viewer\"> ...@@ -270,17 +273,19 @@ $cts->puts("<div class=\"viewer\" id=\"viewer\">
$req = new requete($site->db, $req = new requete($site->db,
"SELECT length_link, ideal_length_link, "SELECT length_link, ideal_length_link,
tense_link, COALESCE(alias_utl,CONCAT(prenom_utl,' ',nom_utl)) AS nom_utilisateur, tense_link, COALESCE(surnom_utbm, alias_utl,CONCAT(prenom_utl,' ',nom_utl)) AS nom_utilisateur,
id_utilisateur utilisateurs.id_utilisateur
FROM galaxy_link FROM galaxy_link
INNER JOIN utilisateurs ON ( id_star_a=id_utilisateur) INNER JOIN utilisateurs ON ( id_star_a=id_utilisateur)
INNER JOIN `utl_etu_utbm` ON (`utl_etu_utbm`.`id_utilisateur` = `utilisateurs`.`id_utilisateur`)
WHERE id_star_b='".mysql_real_escape_string($user->id)."' WHERE id_star_b='".mysql_real_escape_string($user->id)."'
UNION UNION
SELECT length_link, ideal_length_link, SELECT length_link, ideal_length_link,
tense_link, COALESCE(alias_utl,CONCAT(prenom_utl,' ',nom_utl)) AS nom_utilisateur, tense_link, COALESCE(surnom_utbm, alias_utl,CONCAT(prenom_utl,' ',nom_utl)) AS nom_utilisateur,
id_utilisateur utilisateurs.id_utilisateur
FROM galaxy_link FROM galaxy_link
INNER JOIN utilisateurs ON ( id_star_b=id_utilisateur) INNER JOIN utilisateurs ON ( id_star_b=id_utilisateur)
INNER JOIN `utl_etu_utbm` ON (`utl_etu_utbm`.`id_utilisateur` = `utilisateurs`.`id_utilisateur`)
WHERE id_star_a='".mysql_real_escape_string($user->id)."' WHERE id_star_a='".mysql_real_escape_string($user->id)."'
ORDER BY 1"); ORDER BY 1");
...@@ -297,9 +302,10 @@ $cts->puts("<div class=\"viewer\" id=\"viewer\"> ...@@ -297,9 +302,10 @@ $cts->puts("<div class=\"viewer\" id=\"viewer\">
$req = new requete($site->db, $req = new requete($site->db,
"SELECT SQRT(POW(a.x_star-b.x_star,2)+POW(a.y_star-b.y_star,2)) AS dist, "SELECT SQRT(POW(a.x_star-b.x_star,2)+POW(a.y_star-b.y_star,2)) AS dist,
COALESCE(alias_utl,CONCAT(prenom_utl,' ',nom_utl)) AS nom_utilisateur, COALESCE(surnom_utbm, alias_utl,CONCAT(prenom_utl,' ',nom_utl)) AS nom_utilisateur,
id_utilisateur utilisateurs.id_utilisateur
FROM galaxy_star AS a, galaxy_star AS b, utilisateurs FROM galaxy_star AS a, galaxy_star AS b, utilisateurs
INNER JOIN `utl_etu_utbm` ON (`utl_etu_utbm`.`id_utilisateur` = `utilisateurs`.`id_utilisateur`)
WHERE a.id_star='".mysql_real_escape_string($user->id)."' WHERE a.id_star='".mysql_real_escape_string($user->id)."'
AND a.id_star!=b.id_star AND a.id_star!=b.id_star
AND b.id_star=id_utilisateur AND b.id_star=id_utilisateur
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment