You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2022/06/24 20:36:17 UTC

[allura] branch kt/better_empty_page_detect created (now 21865edc2)

This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a change to branch kt/better_empty_page_detect
in repository https://gitbox.apache.org/repos/asf/allura.git


      at 21865edc2 Better detection of empty wiki pages

This branch includes the following new commits:

     new 21865edc2 Better detection of empty wiki pages

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[allura] 01/01: Better detection of empty wiki pages

Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a commit to branch kt/better_empty_page_detect
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 21865edc2fbd91cf804dde03cbd25b3199450c6c
Author: Kenton Taylor <kt...@slashdotmedia.com>
AuthorDate: Fri Jun 24 20:35:57 2022 +0000

    Better detection of empty wiki pages
---
 ForgeWiki/forgewiki/wiki_main.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ForgeWiki/forgewiki/wiki_main.py b/ForgeWiki/forgewiki/wiki_main.py
index 07c51094b..6648e7c13 100644
--- a/ForgeWiki/forgewiki/wiki_main.py
+++ b/ForgeWiki/forgewiki/wiki_main.py
@@ -241,7 +241,11 @@ The wiki uses [Markdown](%s) syntax.
     def should_noindex_page(self, page):
         """Checks whether a page should not be indexed."""
         # If page has default name (i.e. 'Home') and has not been edited, noindex.
-        return page and page['title'] == self.default_root_page_name and page['version'] == 1
+        res = page and page['title'] == self.default_root_page_name and page['version'] == 1
+        if not res:
+            if page and page['text'] in ('You can edit this description', ):
+                res = True
+        return res
 
     def create_common_wiki_menu(self, has_create_access, admin_menu=False):
         links = []