Commits

Thomas Waldmann committed 615ca97

remove more system items / sysitems_upgrade related code

  • Participants
  • Parent commits 3e8c910

Comments (0)

Files changed (6)

File MoinMoin/apps/misc/views.py

 from MoinMoin.constants.keys import MTIME
 from MoinMoin.themes import render_template
 
-SITEMAP_HAS_SYSTEM_ITEMS = True
-
 
 @misc.route('/sitemap')
 def sitemap():
     for rev in flaskg.storage.documents(wikiname=app.cfg.interwikiname):
         name = rev.name
         mtime = rev.meta[MTIME]
-        if False:  # was: wikiutil.isSystemItem(name)   XXX add back later, when we have that in the index
-            if not SITEMAP_HAS_SYSTEM_ITEMS:
-                continue
-            # system items are rather boring
-            changefreq = "yearly"
-            priority = "0.1"
-        else:
-            # these are the content items:
-            changefreq = "daily"
-            priority = "0.5"
+        # these are the content items:
+        changefreq = "daily"
+        priority = "0.5"
         sitemap.append((name, format_timestamp(mtime), changefreq, priority))
     # add an entry for root url
     root_item = app.cfg.item_root

File MoinMoin/constants/keys.py

 # some metadata key constants:
 ACL = "acl"
 
-# This says: I am a system item
-IS_SYSITEM = "is_syspage"
-# This says: original sysitem as contained in release: <release>
-SYSITEM_VERSION = "syspage_version"
-
 # keys for storing group and dict information
 # group of user names, e.g. for ACLs:
 USERGROUP = "usergroup"

File MoinMoin/items/__init__.py

 from MoinMoin.util.clock import timed
 from MoinMoin.forms import RequiredText, OptionalText, JSON, Tags
 from MoinMoin.constants.keys import (
-    NAME, NAME_OLD, NAME_EXACT, WIKINAME, MTIME, SYSITEM_VERSION, ITEMTYPE,
+    NAME, NAME_OLD, NAME_EXACT, WIKINAME, MTIME, ITEMTYPE,
     CONTENTTYPE, SIZE, ACTION, ADDRESS, HOSTNAME, USERID, COMMENT,
     HASH_ALGORITHM, ITEMID, REVID, DATAID, CURRENT, PARENTID
 )
     def meta_filter(self, meta):
         """ kill metadata entries that we set automatically when saving """
         kill_keys = [  # shall not get copied from old rev to new rev
-            SYSITEM_VERSION,
             NAME_OLD,
             # are automatically implanted when saving
             ITEMID, REVID, DATAID,

File MoinMoin/script/__init__.py

     from MoinMoin.script.maint import modify_item
     manager.add_command("item-get", modify_item.GetItem())
     manager.add_command("item-put", modify_item.PutItem())
-    from MoinMoin.script.maint.modified_systemitems import Modified_SystemItems
-    manager.add_command("maint-modified-systemitems", Modified_SystemItems())
     from MoinMoin.script.migration.moin19.import19 import ImportMoin19
     manager.add_command("import19", ImportMoin19())
 

File MoinMoin/script/maint/modified_systemitems.py

-# Copyright: 2004 Nir Soffer <nirs@freeshell.org>
-# Copyright: 2008,2011 MoinMoin:ThomasWaldmann
-# Copyright: 2011 MoinMoin:ReimarBauer
-# License: GNU GPL v2 (or any later version), see LICENSE.txt for details.
-
-"""
-    MoinMoin - list system items that has been edited in this wiki.
-
-"""
-
-
-from flask import current_app as app
-from flask.ext.script import Command
-
-from MoinMoin.constants.keys import IS_SYSITEM, SYSITEM_VERSION
-
-
-class Modified_SystemItems(Command):
-    description = 'This command can be used to list system items that has been edited in this wiki.'
-
-    def run(self):
-        edited_sys_items = []
-        for current_rev in app.storage.documents():
-            is_sysitem = current_rev.meta.get(IS_SYSITEM, False)
-            if is_sysitem:
-                version = current_rev.meta.get(SYSITEM_VERSION)
-                if version is None:
-                    # if we don't have the version, it was edited:
-                    edited_sys_items.append(item.name)
-
-        # Format as numbered list, sorted by item name
-        edited_sys_items.sort()
-        if edited_sys_items:
-            print "Edited system items:"
-            for item_name in edited_sys_items:
-                print item_name
-        else:
-            print "Not any modified system items found!"

File MoinMoin/wikiutil.py

 from flask import request
 
 from MoinMoin.constants.contenttypes import CHARSET
-from MoinMoin.constants.keys import CURRENT, IS_SYSITEM
+from MoinMoin.constants.keys import CURRENT
 from MoinMoin.constants.misc import URI_SCHEMES, CLEAN_INPUT_TRANSLATION_MAP, ITEM_INVALID_CHARS_REGEX
 from MoinMoin.constants.contenttypes import DRAWING_EXTENSIONS
 
 ### Item types / Item names
 #############################################################################
 
-def isSystemItem(itemname):
-    """ Is this a system page?
-
-    :param itemname: the item name
-    :rtype: bool
-    :returns: True if page is a system item
-    """
-    try:
-        item = flaskg.storage[itemname]
-        return item[CURRENT][IS_SYSITEM]
-    except (NoSuchItemError, NoSuchRevisionError, KeyError):
-        return False
-
-
 def isGroupItem(itemname):
     """ Is this a name of group item?