From 75f3e9202e191486b8c9079b08cc6de4e1251b8d Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Fri, 25 Aug 2017 11:32:18 +0000 Subject: Removed duplicated table of contents (TOC) in Help pages by breaking hierarchical TOC loading. --- include/help.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/help.php b/include/help.php index ef6b77e12..02c3cb8e4 100644 --- a/include/help.php +++ b/include/help.php @@ -28,16 +28,22 @@ function get_help_content($tocpath = false) { } if($path) { + $title = basename($path); if(! $tocpath) \App::$page['title'] = t('Help:') . ' ' . ucwords(str_replace('-',' ',notags($title))); + // Check that there is a "toc" or "sitetoc" located at the specified path. + // If there is not, then there was not a translation of the table of contents + // available and so default back to the English TOC at /doc/toc.{html,bb,md} + // TODO: This is incompatible with the hierarchical TOC construction + // defined in /Zotlabs/Widget/Helpindex.php. if($tocpath !== false && load_doc_file('doc/' . $path . '.md') === '' && load_doc_file('doc/' . $path . '.bb') === '' && load_doc_file('doc/' . $path . '.html') === '' ) { - $path = 'toc'; + $path = $title; } $text = load_doc_file('doc/' . $path . '.md'); -- cgit v1.2.3 From dc18440c18549a07b31c7506316e7a4bd40b9712 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 3 Sep 2017 21:33:07 +0200 Subject: introduce item_normal_update(). the differnce to item_normal() is that we do not query for item_deleted = 0 and therefor can find deleted likes which allows us to update our unlikes on the fly if static page update is enabled --- include/items.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/items.php b/include/items.php index 8489ec162..d10d43687 100755 --- a/include/items.php +++ b/include/items.php @@ -182,6 +182,12 @@ function item_normal_search() { and item.item_blocked = 0 "; } +function item_normal_update() { + return " and item.item_hidden = 0 and item.item_type = 0 + and item.item_unpublished = 0 and item.item_delayed = 0 and item.item_pending_remove = 0 + and item.item_blocked = 0 "; +} + /** * @brief -- cgit v1.2.3