diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/bbcode.php | 4 | ||||
-rw-r--r-- | include/conversation.php | 4 | ||||
-rw-r--r-- | include/nav.php | 5 |
3 files changed, 9 insertions, 4 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index fd476766e..e38473168 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -246,8 +246,8 @@ function bb_parse_element($match) { $j = json_decode(base64url_decode($match[1]),true); if ($j && local_channel()) { - $text = sprintf( t('Install %s element: '), translate_design_element($j['type'])) . $j['pagetitle']; - $o = EOL . '<a href="#" onclick="importElement(\'' . $match[1] . '\'); return false;" >' . $text . '</a>' . EOL; + $text = sprintf( t('Install %1$s element %2$s'), translate_design_element($j['type']), $j['pagetitle']); + $o = EOL . '<button class="btn btn-primary" onclick="importElement(\'' . $match[1] . '\'); return false;" >' . $text . '</button>' . EOL; } else { $text = sprintf( t('This post contains an installable %s element, however you lack permissions to install it on this site.' ), translate_design_element($j['type'])) . $j['pagetitle']; diff --git a/include/conversation.php b/include/conversation.php index 841a00d85..fc0942474 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1473,7 +1473,7 @@ function sort_item_children($items) { $result = $items; usort($result,'sort_thr_created_rev'); foreach($result as $k => $i) { - if(count($result[$k]['children'])) { + if($result[$k]['children']) { $result[$k]['children'] = sort_item_children($result[$k]['children']); } } @@ -1483,7 +1483,7 @@ function sort_item_children($items) { function add_children_to_list($children, &$arr) { foreach($children as $y) { $arr[] = $y; - if(count($y['children'])) + if($y['children']) add_children_to_list($y['children'], $arr); } } diff --git a/include/nav.php b/include/nav.php index 8ab401c76..66c4c1556 100644 --- a/include/nav.php +++ b/include/nav.php @@ -73,6 +73,11 @@ EOT; // nav links: array of array('href', 'text', 'extra css classes', 'title') $nav = []; + $disable_discover_tab = get_config('system','disable_discover_tab') || get_config('system','disable_discover_tab') === false; + + if(! $disable_discover_tab) + $nav['pubs'] = true; + /** * Display login or logout */ |