Merge branch 'dev' into oauth2
This commit is contained in:
@@ -54,14 +54,6 @@ function get_features($filtered = true) {
|
||||
t('General Features'),
|
||||
|
||||
|
||||
[
|
||||
'multi_profiles',
|
||||
t('Multiple Profiles'),
|
||||
t('Ability to create multiple profiles'),
|
||||
false,
|
||||
get_config('feature_lock','multi_profiles'),
|
||||
feature_level('multi_profiles',3),
|
||||
],
|
||||
|
||||
[
|
||||
'advanced_profiles',
|
||||
@@ -163,14 +155,6 @@ function get_features($filtered = true) {
|
||||
feature_level('ajaxchat',1),
|
||||
],
|
||||
|
||||
[
|
||||
'permcats',
|
||||
t('Permission Groups'),
|
||||
t('Provide alternate connection permission roles.'),
|
||||
false,
|
||||
get_config('feature_lock','permcats'),
|
||||
feature_level('permcats',2),
|
||||
],
|
||||
|
||||
[
|
||||
'smart_birthdays',
|
||||
@@ -219,6 +203,58 @@ function get_features($filtered = true) {
|
||||
],
|
||||
],
|
||||
|
||||
|
||||
'access_control' => [
|
||||
t('Access Control and Permissions'),
|
||||
|
||||
[
|
||||
'groups',
|
||||
t('Privacy Groups'),
|
||||
t('Enable management and selection of privacy groups'),
|
||||
true,
|
||||
get_config('feature_lock','groups'),
|
||||
feature_level('groups',0),
|
||||
],
|
||||
|
||||
[
|
||||
'multi_profiles',
|
||||
t('Multiple Profiles'),
|
||||
t('Ability to create multiple profiles'),
|
||||
false,
|
||||
get_config('feature_lock','multi_profiles'),
|
||||
feature_level('multi_profiles',3),
|
||||
],
|
||||
|
||||
|
||||
[
|
||||
'permcats',
|
||||
t('Permission Groups'),
|
||||
t('Provide alternate connection permission roles.'),
|
||||
false,
|
||||
get_config('feature_lock','permcats'),
|
||||
feature_level('permcats',2),
|
||||
],
|
||||
|
||||
[
|
||||
'oauth_clients',
|
||||
t('OAuth Clients'),
|
||||
t('Manage authenticatication tokens for mobile and remote apps.'),
|
||||
false,
|
||||
get_config('feature_lock','oauth_clients'),
|
||||
feature_level('oauth_clients',1),
|
||||
],
|
||||
|
||||
[
|
||||
'access_tokens',
|
||||
t('Access Tokens'),
|
||||
t('Create access tokens so that non-members can access private content.'),
|
||||
false,
|
||||
get_config('feature_lock','access_tokens'),
|
||||
feature_level('access_tokens',2),
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
// Post composition
|
||||
'composition' => [
|
||||
|
||||
@@ -312,14 +348,6 @@ function get_features($filtered = true) {
|
||||
feature_level('archives',1),
|
||||
],
|
||||
|
||||
[
|
||||
'groups',
|
||||
t('Privacy Groups'),
|
||||
t('Enable management and selection of privacy groups'),
|
||||
true,
|
||||
get_config('feature_lock','groups'),
|
||||
feature_level('groups',0),
|
||||
],
|
||||
|
||||
[
|
||||
'savedsearch',
|
||||
|
||||
@@ -2464,7 +2464,7 @@ function tag_deliver($uid, $item_id) {
|
||||
// this is an update (edit) to a post which was already processed by us and has a second delivery chain
|
||||
// Just start the second delivery chain to deliver the updated post
|
||||
// after resetting ownership and permission bits
|
||||
|
||||
logger('updating edited tag_deliver post for ' . $u[0]['channel_address']);
|
||||
start_delivery_chain($u[0], $item, $item_id, 0);
|
||||
return;
|
||||
}
|
||||
@@ -2767,6 +2767,16 @@ function tgroup_check($uid, $item) {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// see if we already have this item. Maybe it is being updated.
|
||||
|
||||
$r = q("select id from item where mid = '%s' and uid = %d limit 1",
|
||||
dbesc($item['mid']),
|
||||
intval($uid)
|
||||
);
|
||||
if($r)
|
||||
return true;
|
||||
|
||||
if(! perm_is_allowed($uid,$item['author_xchan'],'tag_deliver'))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -2019,18 +2019,37 @@ function item_post_type($item) {
|
||||
return $post_type;
|
||||
}
|
||||
|
||||
// This needs to be fixed to use quoted tag strings
|
||||
|
||||
function undo_post_tagging($s) {
|
||||
|
||||
$matches = null;
|
||||
// undo tags and mentions
|
||||
$cnt = preg_match_all('/([@#])(\!*)\[zrl=(.*?)\](.*?)\[\/zrl\]/ism',$s,$matches,PREG_SET_ORDER);
|
||||
if($cnt) {
|
||||
foreach($matches as $mtch) {
|
||||
$s = str_replace($mtch[0], $mtch[1] . $mtch[2] . str_replace(' ','_',$mtch[4]),$s);
|
||||
$s = str_replace($mtch[0], $mtch[1] . $mtch[2] . quote_tag($mtch[4]),$s);
|
||||
}
|
||||
}
|
||||
// undo forum tags
|
||||
$cnt = preg_match_all('/\!\[zrl=(.*?)\](.*?)\[\/zrl\]/ism',$s,$matches,PREG_SET_ORDER);
|
||||
if($cnt) {
|
||||
foreach($matches as $mtch) {
|
||||
$s = str_replace($mtch[0], '!' . quote_tag($mtch[2]),$s);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $s;
|
||||
}
|
||||
|
||||
function quote_tag($s) {
|
||||
if(strpos($s,' ') !== false)
|
||||
return '"' . $s . '"';
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
||||
function fix_mce_lf($s) {
|
||||
$s = str_replace("\r\n","\n",$s);
|
||||
// $s = str_replace("\n\n","\n",$s);
|
||||
|
||||
Reference in New Issue
Block a user