Changeset 1908


Ignore:
Timestamp:
07/30/07 14:27:39 (12 years ago)
Author:
jukka
Message:

Accidentally committed some deleted code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Resources.py

    r1907 r1908  
    566566                changedFields = [x for x in set(changedFields + prev_changes) if x[0] != '_'] 
    567567            self.storeInHistory(changedFields) 
    568  
    569     def isID(self, s): 
    570         """ Stupid heuristic to decide s is an id or not. """ 
    571         if len(s) != 32: 
    572             return False 
    573         for i in range(len(s)): 
    574             if s[i] not in ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f']: 
    575                 return False 
    576         return True                 
    577  
    578     def correctReferences(self, oldBodyText, newBodyText): 
    579         """ Delete unused references after restore. """ 
    580         oldIDs = [x for x in oldBodyText if self.isID(x)] 
    581         newIDs = [x for x in newBodyText if self.isID(x)] 
    582         real_newIDs = [x for x in newIDs if x not in oldIDs] 
    583         real_oldIDs = [x for x in oldIDs if x not in newIDs] 
    584         tool = getToolByName(self, 'reference_catalog') 
    585         for x in real_oldIDs: 
    586              tool.deleteReference(self, x, 'uses')     
    587568 
    588569    security.declareProtected(MODIFY_CONTENT, 'restoreAVersion') 
Note: See TracChangeset for help on using the changeset viewer.