]> git.mxchange.org Git - friendica.git/blobdiff - mod/photos.php
error viewing logfiles over 2Gb
[friendica.git] / mod / photos.php
index cb13b760364e72df276db5c3db5dc8eeeef0e074..b74ca85d71b5b1272b277f92c872614a5bb0be7a 100644 (file)
@@ -414,7 +414,8 @@ function photos_post(&$a) {
                                                                );
                                                        }
                                                        else {
-                                                               $r = q("SELECT * FROM `contact` WHERE `nick` = '%s' AND `uid` = %d LIMIT 1",
+                                                               $r = q("SELECT * FROM `contact` WHERE `attag` = '%s' OR `nick` = '%s' AND `uid` = %d ORDER BY `attag` DESC LIMIT 1",
+                                                                       dbesc($name),
                                                                        dbesc($name),
                                                                        intval($page_owner_uid)
                                                                );