aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorAlexandre Hannud Abdo <abdo@member.fsf.org>2014-06-17 04:26:18 -0300
committerAlexandre Hannud Abdo <abdo@member.fsf.org>2014-06-19 15:13:32 -0300
commitb20887995a2b3277659e01d99ae4de238f7175ef (patch)
treeb0513171eccb338c55b7d1a50da0f67e6e8b6f65 /include/items.php
parentc012c648e0691868370a5a8c1eb468020fef6330 (diff)
downloadvolse-hubzilla-b20887995a2b3277659e01d99ae4de238f7175ef.tar.gz
volse-hubzilla-b20887995a2b3277659e01d99ae4de238f7175ef.tar.bz2
volse-hubzilla-b20887995a2b3277659e01d99ae4de238f7175ef.zip
Implements a new permission level PERMS_PENDING
With this a user can allow some action to any user which connects to them, even before they've connected back. Ref. https://mobiliza.org.br/display/478d9e71eaf55748dc646d3990651d6d34cfb7db5c38360538ec730ca3ccf908@zothub.com Also some code cleanup and an alternative logic for handling notifications of permission changes in zot.php. This assumes that private posts are still restricted to people in your addressbook. Regardless of your global permissions, a pending channel won't get private posts, even if the post only has a deny clause not matching the pending channel.
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/items.php b/include/items.php
index f71ebd503..c35a442b2 100755
--- a/include/items.php
+++ b/include/items.php
@@ -943,6 +943,8 @@ function map_scope($scope) {
return 'network: red';
case PERMS_SITE:
return 'site: ' . get_app()->get_hostname();
+ case PERMS_PENDING:
+ return 'any connections';
case PERMS_CONTACTS:
default:
return 'contacts';
@@ -4085,7 +4087,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
}
if(! array_key_exists('nouveau',$arr)) {
- $sql_extra2 = " AND item.parent = item.id ";
+ $sql_extra2 = " AND item.parent = item.id ";
$sql_extra3 = '';
}
@@ -4126,12 +4128,12 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
$pager_sql = sprintf(" LIMIT %d, %d ",intval($arr['start']), intval($arr['records']));
if(array_key_exists('cmin',$arr) || array_key_exists('cmax',$arr)) {
- if(($arr['cmin'] != 0) || ($arr['cmax'] != 99)) {
+ if(($arr['cmin'] != 0) || ($arr['cmax'] != 99)) {
- // Not everybody who shows up in the network stream will be in your address book.
- // By default those that aren't are assumed to have closeness = 99; but this isn't
- // recorded anywhere. So if cmax is 99, we'll open the search up to anybody in
- // the stream with a NULL address book entry.
+ // Not everybody who shows up in the network stream will be in your address book.
+ // By default those that aren't are assumed to have closeness = 99; but this isn't
+ // recorded anywhere. So if cmax is 99, we'll open the search up to anybody in
+ // the stream with a NULL address book entry.
$sql_nets .= " AND ";