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 |
3 files changed, 27 insertions, 10 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) { |