From ee6fd1d6e5fdb9475e8e1eb8e32411c5ccb5adc8 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 1 Jul 2014 21:24:43 -0700 Subject: minor optimisation --- boot.php | 2 +- include/items.php | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/boot.php b/boot.php index e3aec0877..54ef9486e 100755 --- a/boot.php +++ b/boot.php @@ -1998,7 +1998,7 @@ function appdirpath() { function head_set_icon($icon) { global $a; $a->data['pageicon'] = $icon; - logger('head_set_icon: ' . $icon); +// logger('head_set_icon: ' . $icon); } function head_get_icon() { 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) { -- cgit v1.2.3