コード例 #1
0
 def _delete_object_only(self, doc):
     # Delete object without removing it from the catalog.
     portal = self.layer['portal']
     patches.apply()
     portal._delObject(doc.getId())
     patches.unapply()
     transaction.commit()
コード例 #2
0
    def apply(self):
        reindex = False
        index = False
        unindex = False
        # in no index give select all
        if 'no-reindex' not in self.request and \
                'no-index' not in self.request and \
                'no-unindex' not in self.request:
            reindex = True
            index = True
            unindex = True
        # otherwise select one or more
        if 'no-reindex' in self.request:
            reindex = True
        if 'no-index' in self.request:
            index = True
        if 'no-unindex' in self.request:
            unindex = True

        patches.apply(reindex, index, unindex)
        return u"collective.noindexing patches applied"
コード例 #3
0
    def apply(self):
        reindex = False
        index = False
        unindex = False
        # in no index give select all
        if 'no-reindex' not in self.request and \
                'no-index' not in self.request and \
                'no-unindex' not in self.request:
            reindex = True
            index = True
            unindex = True
        # otherwise select one or more
        if 'no-reindex' in self.request:
            reindex = True
        if 'no-index' in self.request:
            index = True
        if 'no-unindex' in self.request:
            unindex = True

        patches.apply(reindex, index, unindex)
        return u"collective.noindexing patches applied"
コード例 #4
0
 def testSetUp(self):
     from collective.noindexing import patches
     patches.apply()
コード例 #5
0
 def testSetUp(self):
     from collective.noindexing import patches
     patches.apply()