From d9efb037e3d0c14fa288e8b54c3d55d67689ab54 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Fri, 5 Oct 2018 13:16:29 +0200 Subject: Prevent links damage on foreign channel repost for cloned --- include/text.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') 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; } -- cgit v1.2.3 From cd5f25596678da5cba2e9208ec817a103e20914c Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 6 Oct 2018 17:20:23 +0200 Subject: strings and force import_system_apps() on std_version change --- include/nav.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') 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) { -- cgit v1.2.3 From 66cf0852728d2f95ed3a5b7a304dbc7b79111831 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 6 Oct 2018 20:29:32 +0200 Subject: move profile assign selector to profile settings and personal menu selector to channel_home settings and get rid of misc channel settings section. --- include/selectors.php | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'include') 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 .= "\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) { -- cgit v1.2.3 From 259db3778c9385b9e4811e495146267b14b67a46 Mon Sep 17 00:00:00 2001 From: "M.Dent" Date: Sat, 6 Oct 2018 23:02:22 -0400 Subject: Add missing else clause --- include/plugin.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') 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; } } -- cgit v1.2.3