From bcaa32a83a965f111bfc2ba085a59857a4fa0c2d Mon Sep 17 00:00:00 2001 From: Habeas Codice Date: Mon, 17 Nov 2014 15:13:49 -0800 Subject: fix boolean --- mod/photos.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/photos.php b/mod/photos.php index 95fa162c9..a2e5d1c1b 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -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')), -- cgit v1.2.3 From 4fa0df2927323a10fb813f4303f9c472e214c48d Mon Sep 17 00:00:00 2001 From: Habeas Codice Date: Mon, 17 Nov 2014 16:01:17 -0800 Subject: another one --- mod/photos.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/photos.php b/mod/photos.php index ad95d6a88..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), -- cgit v1.2.3 From d0e0a8fb27bcb5d460d28a2a2677cdad93e5c4ee Mon Sep 17 00:00:00 2001 From: Habeas Codice Date: Mon, 17 Nov 2014 16:37:47 -0800 Subject: implicit type conversion --- mod/poco.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/poco.php b/mod/poco.php index fc01fc565..59dbf8f93 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -69,7 +69,7 @@ function poco_init(&$a) { if($system_mode) { $r = q("SELECT count(*) as `total` from abook where ( abook_flags & " . ABOOK_FLAG_SELF . - " )>0 and abook_channel in (select uid from pconfig where cat = 'system' and k = 'suggestme' and v = 1) "); + " )>0 and abook_channel in (select uid from pconfig where cat = 'system' and k = 'suggestme' and v = '1') "); } else { $r = q("SELECT count(*) as `total` from abook where abook_channel = %d -- cgit v1.2.3 From e61dbf722d35b748ff57b1260f30b9ac0fda60aa Mon Sep 17 00:00:00 2001 From: Habeas Codice Date: Mon, 17 Nov 2014 16:49:17 -0800 Subject: implicit type conversion --- mod/poco.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/poco.php b/mod/poco.php index 59dbf8f93..3f932e92f 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -93,7 +93,7 @@ function poco_init(&$a) { if($system_mode) { $r = q("SELECT abook.*, xchan.* from abook left join xchan on abook_xchan = xchan_hash where ( abook_flags & " . ABOOK_FLAG_SELF . - " )>0 and abook_channel in (select uid from pconfig where cat = 'system' and k = 'suggestme' and v = 1) limit %d offset %d ", + " )>0 and abook_channel in (select uid from pconfig where cat = 'system' and k = 'suggestme' and v = '1') limit %d offset %d ", intval($itemsPerPage), intval($startIndex) ); -- cgit v1.2.3