Merge branch 'dev'

This commit is contained in:
zotlabs
2018-10-08 20:58:16 -07:00
52 changed files with 24545 additions and 22886 deletions

View File

@@ -229,6 +229,11 @@ function nav($template = 'default') {
set_pconfig(local_channel(), 'system','import_system_apps', datetime_convert('UTC','UTC','now','Y-m-d'));
}
if(get_pconfig(local_channel(), 'system','force_import_system_apps') !== STD_VERSION) {
Apps::import_system_apps();
set_pconfig(local_channel(), 'system','force_import_system_apps', STD_VERSION);
}
$syslist = array();
$list = Apps::app_list(local_channel(), false, ['nav_featured_app', 'nav_pinned_app']);
if($list) {

View File

@@ -1075,8 +1075,9 @@ function get_markup_template($s, $root = '') {
$newroot .= '/';
}
$template = $t->get_markup_template($s, $newroot);
}
$template = $t->get_markup_template($s, $root);
} else {
$template = $t->get_markup_template($s, $root);
}
return $template;
}
}

View File

@@ -3,21 +3,32 @@
function contact_profile_assign($current) {
$o = '';
$o .= "<select id=\"contact-profile-selector\" name=\"profile_assign\" class=\"form-control\"/>\r\n";
$r = q("SELECT profile_guid, profile_name FROM profile WHERE uid = %d",
intval($_SESSION['uid']));
intval($_SESSION['uid'])
);
if($r) {
foreach($r as $rr) {
$selected = (($rr['profile_guid'] == $current) ? " selected=\"selected\" " : "");
$o .= "<option value=\"{$rr['profile_guid']}\" $selected >{$rr['profile_name']}</option>\r\n";
$options[$rr['profile_guid']] = $rr['profile_name'];
}
}
$o .= "</select>\r\n";
$select = [
'profile_assign',
t('Profile to assign new connections'),
$current,
'',
$options
];
$o = replace_macros(get_markup_template('field_select.tpl'),
[
'$field' => $select
]
);
return $o;
}
function contact_poll_interval($current, $disabled = false) {

View File

@@ -2965,7 +2965,9 @@ function item_url_replace($channel,&$item,$old,$new,$oldnick = '') {
json_url_replace('/' . $oldnick . '/' ,'/' . $channel['channel_address'] . '/' ,$item['target']);
}
if(string_replace($old,$new,$item['body'])) {
$x = preg_replace("/".preg_quote($old,'/')."\/(search|\w+\/".$channel['channel_address'].")/", $new.'/${1}', $item['body']);
if($x) {
$item['body'] = $x;
$item['sig'] = base64url_encode(rsa_sign($item['body'],$channel['channel_prvkey']));
$item['item_verified'] = 1;
}