rename collections to privacy groups

This commit is contained in:
redmatrix
2016-01-26 23:44:15 -08:00
parent 202817740a
commit d83b907cdc
16 changed files with 500 additions and 495 deletions

View File

@@ -76,7 +76,7 @@ function get_features($filtered = true) {
'net_module' => array(
t('Network and Stream Filtering'),
array('archives', t('Search by Date'), t('Ability to select posts by date ranges'),false,get_config('feature_lock','archives')),
array('groups', t('Collections (Privacy Groups)'), t('Enable widget to display Network posts only from selected collections'),false,get_config('feature_lock','groups')),
array('groups', t('Privacy Groups'), t('Enable management and selection of privacy groups'),true,get_config('feature_lock','groups')),
array('savedsearch', t('Saved Searches'), t('Save search terms for re-use'),false,get_config('feature_lock','savedsearch')),
array('personal_tab', t('Network Personal Tab'), t('Enable tab to display only Network posts that you\'ve interacted on'),false,get_config('feature_lock','personal_tab')),
array('new_tab', t('Network New Tab'), t('Enable tab to display all new Network activity'),false,get_config('feature_lock','new_tab')),

View File

@@ -229,7 +229,7 @@ function mini_group_select($uid,$group = '') {
logger('mini_group_select: ' . print_r($grps,true), LOGGER_DATA);
$o = replace_macros(get_markup_template('group_selection.tpl'), array(
'$label' => t('Add new connections to this collection (privacy group)'),
'$label' => t('Add new connections to this privacy group'),
'$groups' => $grps
));
return $o;
@@ -292,10 +292,10 @@ function group_side($every="connections",$each="group",$edit = false, $group_id
$tpl = get_markup_template("group_side.tpl");
$o = replace_macros($tpl, array(
'$title' => t('Collections'),
'$edittext' => t('Edit collection'),
'$createtext' => t('Add new collection'),
'$ungrouped' => (($every === 'contacts') ? t('Channels not in any collection') : ''),
'$title' => t('Privacy Groups'),
'$edittext' => t('Edit group'),
'$createtext' => t('Add privacy group'),
'$ungrouped' => (($every === 'contacts') ? t('Channels not in any privacy group') : ''),
'$groups' => $groups,
'$add' => t('add'),
));

View File

@@ -159,7 +159,7 @@ function filter_insecure($channel_id, $arr) {
$ret = array();
if((! intval(get_pconfig($channel_id, 'system', 'filter_insecure_collections'))) || (! $arr))
if((! intval(get_pconfig($channel_id, 'system', 'filter_insecure_privacy_groups'))) || (! $arr))
return $arr;
$str = '';
@@ -4859,7 +4859,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
intval($uid)
);
if(! $r) {
$result['message'] = t('Collection not found.');
$result['message'] = t('Privacy group not found.');
return $result;
}
@@ -4875,14 +4875,14 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
}
} else {
$contact_str = ' 0 ';
$result['message'] = t('Collection is empty.');
$result['message'] = t('Privacy group is empty.');
return $result;
}
$sql_extra = " AND item.parent IN ( SELECT DISTINCT parent FROM item WHERE true $sql_options AND (( author_xchan IN ( $contact_str ) OR owner_xchan in ( $contact_str)) or allow_gid like '" . protect_sprintf('%<' . dbesc($r[0]['hash']) . '>%') . "' ) and id = parent $item_normal ) ";
$x = group_rec_byhash($uid,$r[0]['hash']);
$result['headline'] = sprintf( t('Collection: %s'),$x['name']);
$result['headline'] = sprintf( t('Privacy group: %s'),$x['name']);
}
elseif($arr['cid'] && $uid) {