From: Pascal Corpet Date: Sun, 27 Feb 2005 11:21:14 +0000 (+0000) Subject: fixes bug for new photos X-Git-Tag: xorg/old~249 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=38000748e209d1c449196ab84c62835a37a4cc8b;p=platal.git fixes bug for new photos git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-511 --- diff --git a/htdocs/fiche.php b/htdocs/fiche.php index 3a931da..968b242 100644 --- a/htdocs/fiche.php +++ b/htdocs/fiche.php @@ -54,7 +54,7 @@ $page->assign('xorg_title', $title); // photo -$photo = 'getphoto.php?x='.($new ? $user['user_id'].'&req=true' : $user['forlife']); +$photo = 'getphoto.php?x='.$user['forlife'].($new ? '&req=true' : ''); if(!isset($user['y']) and !isset($user['x'])) { list($user['x'], $user['y']) = getimagesize("images/none.png"); diff --git a/htdocs/getphoto.php b/htdocs/getphoto.php index 6e209ef..314a373 100644 --- a/htdocs/getphoto.php +++ b/htdocs/getphoto.php @@ -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()) {