diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/nav.php | 5 | ||||
-rwxr-xr-x | include/plugin.php | 5 | ||||
-rw-r--r-- | include/selectors.php | 27 | ||||
-rw-r--r-- | include/text.php | 4 |
4 files changed, 30 insertions, 11 deletions
diff --git a/include/nav.php b/include/nav.php index b5592d7aa..d405b9f06 100644 --- a/include/nav.php +++ b/include/nav.php @@ -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) { diff --git a/include/plugin.php b/include/plugin.php index fdc62b3a7..ce081401d 100755 --- a/include/plugin.php +++ b/include/plugin.php @@ -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; } } diff --git a/include/selectors.php b/include/selectors.php index ab049fff6..71e2a387d 100644 --- a/include/selectors.php +++ b/include/selectors.php @@ -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) { diff --git a/include/text.php b/include/text.php index f03d0b860..1d884593f 100644 --- a/include/text.php +++ b/include/text.php @@ -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; } |