From: Pierre Habouzit (MadCoder
Date: Mon, 10 Jan 2005 15:52:18 +0000 (+0000)
Subject: getphoto does not take uid anymore
X-Git-Tag: xorg/old~487
X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=64e019c67a2086f5453077846b789f140a7e48e5;p=platal.git
getphoto does not take uid anymore
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-264
---
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}
-
+
-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)