From 098682c660e0fb9700fba3e83228ff30e621b33d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Wed, 24 Jul 2013 14:12:15 +0000 Subject: [PATCH] =?UTF-8?q?Bugfix=20damit=20bereits=20akzeptierte=20Fotos?= =?UTF-8?q?=20die=20im=20nachhinein=20doch=20abgelehnt=20wurden=20erneut?= =?UTF-8?q?=20hochgeladen=20werden=20k=C3=B6nnen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/fotostatus.class.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/include/fotostatus.class.php b/include/fotostatus.class.php index 71abf8313..6e6f5c277 100755 --- a/include/fotostatus.class.php +++ b/include/fotostatus.class.php @@ -51,17 +51,20 @@ class fotostatus extends basis_db public function akzeptiert($person_id) { $qry = "SELECT - * + fotostatus_kurzbz FROM public.tbl_person_fotostatus WHERE person_id=".$this->db_add_param($person_id)." - AND fotostatus_kurzbz='akzeptiert'"; + ORDER BY datum desc, person_fotostatus_id desc limit 1"; if($result = $this->db_query($qry)) { - if($this->db_num_rows($result)>0) + if($row = $this->db_fetch_object($result)) { - return true; + if($row->fotostatus_kurzbz=='akzeptiert') + return true; + else + return false; } else {