minor optimisation
This commit is contained in:
parent
c037a5083c
commit
ee6fd1d6e5
2
boot.php
2
boot.php
@ -1998,7 +1998,7 @@ function appdirpath() {
|
|||||||
function head_set_icon($icon) {
|
function head_set_icon($icon) {
|
||||||
global $a;
|
global $a;
|
||||||
$a->data['pageicon'] = $icon;
|
$a->data['pageicon'] = $icon;
|
||||||
logger('head_set_icon: ' . $icon);
|
// logger('head_set_icon: ' . $icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
function head_get_icon() {
|
function head_get_icon() {
|
||||||
|
@ -32,11 +32,9 @@ function collect_recipients($item,&$private) {
|
|||||||
// as that would allow the denied person to see the post by logging out.
|
// as that would allow the denied person to see the post by logging out.
|
||||||
|
|
||||||
if((! $item['allow_cid']) && (! $item['allow_gid'])) {
|
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($item['uid']),
|
||||||
intval(ABOOK_FLAG_SELF),
|
intval(ABOOK_FLAG_SELF|ABOOK_FLAG_PENDING|ABOOK_FLAG_ARCHIVED)
|
||||||
intval(ABOOK_FLAG_PENDING),
|
|
||||||
intval(ABOOK_FLAG_ARCHIVED)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if($r) {
|
if($r) {
|
||||||
@ -55,11 +53,9 @@ function collect_recipients($item,&$private) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(! $private) {
|
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($item['uid']),
|
||||||
intval(ABOOK_FLAG_SELF),
|
intval(ABOOK_FLAG_SELF|ABOOK_FLAG_PENDING|ABOOK_FLAG_ARCHIVED)
|
||||||
intval(ABOOK_FLAG_PENDING),
|
|
||||||
intval(ABOOK_FLAG_ARCHIVED)
|
|
||||||
);
|
);
|
||||||
if($r) {
|
if($r) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
|
Reference in New Issue
Block a user