aboutsummaryrefslogtreecommitdiffstats
path: root/include/security.php
diff options
context:
space:
mode:
authortony baldwin <tony@tonybaldwin.org>2014-04-12 08:37:56 -0400
committertony baldwin <tony@tonybaldwin.org>2014-04-12 08:37:56 -0400
commitebd33b185da1c36e718dfa4a2971c3db35cbda22 (patch)
treec23cbf55aac433c90ac254d0684dabf9d4528133 /include/security.php
parent5cca00ddc79dad667464674e08a2a860e262eabd (diff)
parentd0834c7e1394e1986b2b00e039125deff74d9e5e (diff)
downloadvolse-hubzilla-ebd33b185da1c36e718dfa4a2971c3db35cbda22.tar.gz
volse-hubzilla-ebd33b185da1c36e718dfa4a2971c3db35cbda22.tar.bz2
volse-hubzilla-ebd33b185da1c36e718dfa4a2971c3db35cbda22.zip
Merge remote-tracking branch 'upstream/master'
Conflicts: view/theme/redbasic/css/style.css whatever
Diffstat (limited to 'include/security.php')
-rw-r--r--include/security.php21
1 files changed, 13 insertions, 8 deletions
diff --git a/include/security.php b/include/security.php
index f52615357..0edbf854d 100644
--- a/include/security.php
+++ b/include/security.php
@@ -53,8 +53,9 @@ function authenticate_success($user_record, $login_initial = false, $interactive
/* This account has never created a channel. Send them to new_channel by default */
if($a->module === 'login') {
- $r = q("select count(channel_id) as total from channel where channel_account_id = %d",
- intval($a->account['account_id'])
+ $r = q("select count(channel_id) as total from channel where channel_account_id = %d and not ( channel_pageflags & %d)",
+ intval($a->account['account_id']),
+ intval(PAGE_REMOVED)
);
if(($r) && (! $r[0]['total']))
goaway(z_root() . '/new_channel');
@@ -346,8 +347,10 @@ function stream_perms_api_uids($perms_min = PERMS_SITE) {
$ret = array();
if(local_user())
$ret[] = local_user();
- $r = q("select channel_id from channel where channel_r_stream > 0 and channel_r_stream <= %d",
- intval($perms_min)
+ $r = q("select channel_id from channel where channel_r_stream > 0 and channel_r_stream <= %d and not (channel_pageflags & %d) and not (channel_pageflags & %d)",
+ intval($perms_min),
+ intval(PAGE_CENSORED),
+ intval(PAGE_SYSTEM)
);
if($r)
foreach($r as $rr)
@@ -361,7 +364,7 @@ function stream_perms_api_uids($perms_min = PERMS_SITE) {
$str .= ',';
$str .= intval($rr);
}
-logger('stream_perms_api_uids: ' . $str);
+logger('stream_perms_api_uids: ' . $str, LOGGER_DEBUG);
return $str;
}
@@ -370,8 +373,10 @@ function stream_perms_xchans($perms_min = PERMS_SITE) {
if(local_user())
$ret[] = get_observer_hash();
- $r = q("select channel_hash from channel where channel_r_stream > 0 and channel_r_stream <= %d",
- intval($perms_min)
+ $r = q("select channel_hash from channel where channel_r_stream > 0 and channel_r_stream <= %d and not (channel_pageflags & %d) and not (channel_pageflags & %d)",
+ intval($perms_min),
+ intval(PAGE_CENSORED),
+ intval(PAGE_SYSTEM)
);
if($r)
foreach($r as $rr)
@@ -385,6 +390,6 @@ function stream_perms_xchans($perms_min = PERMS_SITE) {
$str .= ',';
$str .= "'" . dbesc($rr) . "'";
}
-logger('stream_perms_xchans: ' . $str);
+logger('stream_perms_xchans: ' . $str, LOGGER_DEBUG);
return $str;
}