From 64e019c67a2086f5453077846b789f140a7e48e5 Mon Sep 17 00:00:00 2001 From: "Pierre Habouzit (MadCoder" Date: Mon, 10 Jan 2005 15:52:18 +0000 Subject: [PATCH] getphoto does not take uid anymore git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-264 --- htdocs/getphoto.php | 14 +++++--------- templates/admin/admin_trombino.tpl | 6 +++--- templates/include/form.valid.photos.tpl | 4 ++-- templates/profil/general.tpl | 2 +- templates/trombino.tpl | 4 ++-- 5 files changed, 13 insertions(+), 17 deletions(-) diff --git a/htdocs/getphoto.php b/htdocs/getphoto.php index 4cd6956..815b35f 100644 --- a/htdocs/getphoto.php +++ b/htdocs/getphoto.php @@ -30,15 +30,11 @@ if (Env::has('x')) { Header('Content-type: image/'.$myphoto->mimetype); echo $myphoto->data; } else { - if(preg_match('/^\d*$/', Env::get('x'))) { - $res = $globals->xdb->query('SELECT attachmime, attach FROM photo WHERE uid = {?}', Env::getInt('x')); - } else { - $res = $globals->xdb->query( - "SELECT attachmime, attach - FROM photo AS p - INNER JOIN aliases AS a ON p.uid=a.id - WHERE alias={?}", Env::get('x')); - } + $res = $globals->xdb->query( + "SELECT attachmime, attach + FROM photo AS p + INNER JOIN aliases AS a ON p.uid=a.id + WHERE alias={?}", Env::get('x')); if( list($type,$data) = $res->fetchOneRow() ) { Header( "Content-type: image/$type"); diff --git a/templates/admin/admin_trombino.tpl b/templates/admin/admin_trombino.tpl index ea6b7df..984cbd8 100644 --- a/templates/admin/admin_trombino.tpl +++ b/templates/admin/admin_trombino.tpl @@ -27,15 +27,15 @@ Photo actuelle de {$forlife}

-[ PHOTO ] +[ PHOTO ]

-Supprimer cette photo +Supprimer cette photo

-Voir sa photo de trombi récupérée à l'école (si disponible) +Voir sa photo de trombi récupérée à l'école (si disponible)

diff --git a/templates/include/form.valid.photos.tpl b/templates/include/form.valid.photos.tpl index 06b6bc4..e6b1dfd 100644 --- a/templates/include/form.valid.photos.tpl +++ b/templates/include/form.valid.photos.tpl @@ -21,9 +21,9 @@ Photos -  [ PHOTO ] +  [ PHOTO ]      -  [ PHOTO ] +  [ PHOTO ] diff --git a/templates/profil/general.tpl b/templates/profil/general.tpl index d731365..a5ea19a 100644 --- a/templates/profil/general.tpl +++ b/templates/profil/general.tpl @@ -148,7 +148,7 @@ {/if}. -  [ PHOTO ] +  [ PHOTO ] diff --git a/templates/trombino.tpl b/templates/trombino.tpl index 9f3db6b..e4ade73 100644 --- a/templates/trombino.tpl +++ b/templates/trombino.tpl @@ -48,11 +48,11 @@ -  [ PHOTO ] +  [ PHOTO ] {if $submited} -  [ PHOTO ] +  [ PHOTO ] {else} Pas d'image soumise {/if} -- 2.1.4