aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/import.php2
-rw-r--r--include/nav.php5
-rwxr-xr-xinclude/plugin.php5
-rw-r--r--include/selectors.php27
4 files changed, 28 insertions, 11 deletions
diff --git a/include/import.php b/include/import.php
index 0fc24a26f..714161c57 100644
--- a/include/import.php
+++ b/include/import.php
@@ -234,7 +234,7 @@ function import_hublocs($channel, $hublocs, $seize, $moving = false) {
if(($x = zot_gethub($arr,false)) === false) {
unset($hubloc['hubloc_id']);
- create_table_from_array('hubloc', $hubloc);
+ hubloc_store_lowlevel($hubloc);
}
else {
q("UPDATE hubloc set hubloc_primary = %d, hubloc_deleted = %d where hubloc_id = %d",
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) {