aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorRedMatrix <info@friendica.com>2014-11-18 13:00:26 +1100
committerRedMatrix <info@friendica.com>2014-11-18 13:00:26 +1100
commit913dafc5937e876250c2f177e303f226e8255093 (patch)
tree118426791adaf2c4cd65a05f249f35c2260c3e8b /mod/photos.php
parent65a6121014b1b985d176ea482077400cfee1c3a9 (diff)
parente61dbf722d35b748ff57b1260f30b9ac0fda60aa (diff)
downloadvolse-hubzilla-913dafc5937e876250c2f177e303f226e8255093.tar.gz
volse-hubzilla-913dafc5937e876250c2f177e303f226e8255093.tar.bz2
volse-hubzilla-913dafc5937e876250c2f177e303f226e8255093.zip
Merge pull request #698 from habeascodice/master
some sql fixes
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/mod/photos.php b/mod/photos.php
index ab1e4b48a..ab848c709 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -618,7 +618,7 @@ function photos_content(&$a) {
$album = hex2bin($datum);
$r = q("SELECT `resource_id`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` = '%s'
- AND `scale` <= 4 and ((photo_flags = %d) or (photo_flags & %d )) $sql_extra GROUP BY `resource_id`",
+ AND `scale` <= 4 and ((photo_flags = %d) or (photo_flags & %d ) > 0) $sql_extra GROUP BY `resource_id`",
intval($owner_uid),
dbesc($album),
intval(PHOTO_NORMAL),
@@ -1160,7 +1160,7 @@ function photos_content(&$a) {
//$o = '';
$r = q("SELECT `resource_id`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s'
- and ((photo_flags = %d) or (photo_flags & %d)) $sql_extra GROUP BY `resource_id`",
+ and ((photo_flags = %d) or (photo_flags & %d) > 0) $sql_extra GROUP BY `resource_id`",
intval($a->data['channel']['channel_id']),
dbesc('Contact Photos'),
dbesc( t('Contact Photos')),