aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-07-01 21:24:43 -0700
committerfriendica <info@friendica.com>2014-07-01 21:24:43 -0700
commitee6fd1d6e5fdb9475e8e1eb8e32411c5ccb5adc8 (patch)
treed32d5c9e66bb6c78fc9e382629ad2493f4d7a584 /include
parentc037a5083ca45738247bb250693f3e8fd08c5424 (diff)
downloadvolse-hubzilla-ee6fd1d6e5fdb9475e8e1eb8e32411c5ccb5adc8.tar.gz
volse-hubzilla-ee6fd1d6e5fdb9475e8e1eb8e32411c5ccb5adc8.tar.bz2
volse-hubzilla-ee6fd1d6e5fdb9475e8e1eb8e32411c5ccb5adc8.zip
minor optimisation
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/items.php b/include/items.php
index 7fcb382b7..7bb47a284 100755
--- a/include/items.php
+++ b/include/items.php
@@ -32,11 +32,9 @@ function collect_recipients($item,&$private) {
// as that would allow the denied person to see the post by logging out.
if((! $item['allow_cid']) && (! $item['allow_gid'])) {
- $r = q("select * from abook where abook_channel = %d and not (abook_flags & %d) and not (abook_flags & %d) and not (abook_flags & %d)",
+ $r = q("select * from abook where abook_channel = %d and not (abook_flags & %d) ",
intval($item['uid']),
- intval(ABOOK_FLAG_SELF),
- intval(ABOOK_FLAG_PENDING),
- intval(ABOOK_FLAG_ARCHIVED)
+ intval(ABOOK_FLAG_SELF|ABOOK_FLAG_PENDING|ABOOK_FLAG_ARCHIVED)
);
if($r) {
@@ -55,11 +53,9 @@ function collect_recipients($item,&$private) {
}
else {
if(! $private) {
- $r = q("select abook_xchan from abook where abook_channel = %d and not (abook_flags & %d) and not (abook_flags & %d) and not (abook_flags & %d)",
+ $r = q("select abook_xchan from abook where abook_channel = %d and not (abook_flags & %d) ",
intval($item['uid']),
- intval(ABOOK_FLAG_SELF),
- intval(ABOOK_FLAG_PENDING),
- intval(ABOOK_FLAG_ARCHIVED)
+ intval(ABOOK_FLAG_SELF|ABOOK_FLAG_PENDING|ABOOK_FLAG_ARCHIVED)
);
if($r) {
foreach($r as $rr) {