fixes bug for new photos
authorPascal Corpet <pascal.corpet@m4x.org>
Sun, 27 Feb 2005 11:21:14 +0000 (11:21 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:28:19 +0000 (23:28 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-511

htdocs/fiche.php
htdocs/getphoto.php

index 3a931da..968b242 100644 (file)
@@ -54,7 +54,7 @@ $page->assign('xorg_title', $title);
 
 // photo
 
-$photo = 'getphoto.php?x='.($new ? $user['user_id'].'&amp;req=true' : $user['forlife']);
+$photo = 'getphoto.php?x='.$user['forlife'].($new ? '&amp;req=true' : '');
 
 if(!isset($user['y']) and !isset($user['x'])) {
     list($user['x'], $user['y']) = getimagesize("images/none.png");
index 6e209ef..314a373 100644 (file)
@@ -25,7 +25,7 @@ new_skinned_page('login.tpl', AUTH_PUBLIC);
 
 if (Env::has('x')) {
 
-    $res = $globals->xdb->query("SELECT id, pub FROM aliases INNER JOIN photo ON(id=uid) WHERE alias = {?}", Env::get('x'));
+    $res = $globals->xdb->query("SELECT id, pub FROM aliases LEFT JOIN photo ON(id=uid) WHERE alias = {?}", Env::get('x'));
     list($uid, $photo_pub) = $res->fetchOneRow();
     
     if (Env::get('req') == "true" && logged()) {