Changeset 792
- Timestamp:
- 16.11.2009 15:43:14 (2 years ago)
- Location:
- ZMS/trunk
- Files:
-
- 5 edited
-
ZMSGlobals.py (modified) (2 diffs)
-
_confmanager.py (modified) (2 diffs)
-
_zcatalogmanager.py (modified) (2 diffs)
-
changes.txt (modified) (2 diffs)
-
version.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ZMS/trunk/ZMSGlobals.py
r752 r792 34 34 import base64 35 35 import copy 36 import md537 36 import operator 38 37 import os … … 52 51 __all__= ['ZMSGlobals'] 53 52 54 55 53 # ------------------------------------------------------------------------------ 56 54 # MD5: 57 55 # ------------------------------------------------------------------------------ 58 class MD5DigestScheme: 56 try: # Python >= 2.5 57 import hashlib 58 59 class MD5DigestScheme: 59 60 60 61 def encrypt(self, pw): 61 enc = md5.new(pw)62 enc = enc.hexdigest()63 return enc62 enc = hashlib.md5(pw) 63 enc = enc.hexdigest() 64 return enc 64 65 65 66 def validate(self, reference, attempt): 66 compare = self.encrypt(attempt)[:-1] 67 return (compare == reference) 67 compare = self.encrypt(attempt)[:-1] 68 return (compare == reference) 69 70 except: # Python < 2.5 71 import md5 72 73 class MD5DigestScheme: 74 75 def encrypt(self, pw): 76 enc = md5.new(pw) 77 enc = enc.hexdigest() 78 return enc 79 80 def validate(self, reference, attempt): 81 compare = self.encrypt(attempt)[:-1] 82 return (compare == reference) 68 83 69 84 AuthEncoding.registerScheme('MD5', MD5DigestScheme()) -
ZMS/trunk/_confmanager.py
r752 r792 214 214 conf = open( filepaths[1]+'configure.zcml','r') 215 215 conf_xml = self.xmlParse( conf) 216 print "conf_xml=",conf_xml217 216 for source in self.xmlNodeSet(conf_xml,'source'): 218 217 location = source['attrs']['location'] 219 print "location=",location220 218 if location.startswith('http://'): 221 219 try: … … 230 228 else: 231 229 for filepath in filepaths: 232 for filename in os.listdir(filepath+location): 233 path = filepath + filename 234 mode = os.stat(path)[stat.ST_MODE] 235 if not stat.S_ISDIR(mode): 236 if filename not in filenames: 237 filenames[path] = filename 230 if os.path.exists( filepath): 231 for filename in os.listdir(filepath+location): 232 path = filepath + filename 233 mode = os.stat(path)[stat.ST_MODE] 234 if not stat.S_ISDIR(mode): 235 if filename not in filenames: 236 filenames[path] = filename 238 237 conf.close() 239 238 # Filter. -
ZMS/trunk/_zcatalogmanager.py
r676 r792 88 88 # return quoted search string. 89 89 return s 90 91 # ------------------------------------------------------------------------------92 # _zcatalogmanager.addVocabulary:93 # ------------------------------------------------------------------------------94 def addVocabulary( self, cat):95 from Products.ZCatalog import Vocabulary96 97 #-- Remove Default-Vocabulary98 ids = cat.objectIds( ['Vocabulary'])99 if len( ids) > 0:100 cat.manage_delObjects( ids)101 102 #-- Add ISO 8859-1 Vocabulary103 # see ZCatalogs with Umlauts104 # http://www.zope.org/Members/strobl/HowTos/Iszcatalog105 globbing = 1106 splitter = "ISO_8859_1_Splitter"107 voc = Vocabulary.Vocabulary( "Vocabulary", "Default vocabulary", globbing, splitter)108 cat._setObject( voc.id, voc)109 90 110 91 # ------------------------------------------------------------------------------ … … 523 504 else: 524 505 zcatalog = obs[ 0] 525 526 #-- Add vocabulary527 addVocabulary( self, zcatalog)528 506 529 507 #-- Add lexicon -
ZMS/trunk/changes.txt
r752 r792 1371 1371 [01271] Increased col-size threshold for string -> text in SQL-Datasource from 50 to 128 (requested by fh). 1372 1372 -------------------------------------------------- 1373 2009-10- 19:zms-2.11.4-021373 2009-10-25:zms-2.11.4-02 1374 1374 [01271] Revised imports from Globals with respect for deprecation warnings in Zope2-2.12.0. 1375 1375 [01272] Removed webdav-support for compatibility with Zope2-2.12.0. … … 1378 1378 [01275] Added support for overwriting configuration of $ZMS_HOME/import/configure.zcml by $INSTANCE_HOME/etc/zms/import/configure.zcml(requested by xm). 1379 1379 -------------------------------------------------- 1380 2009-10-26:zms2-2.12.0-01 1381 [01276] Added support for Zope2-2.12.0 / Python-2.6.3. 1382 1383 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1384 +++ IMPORTANT NOTE: ZMS will remain compliant with Zope-2.10.x / Python-2.4 until further notice! 1385 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1386 -------------------------------------------------- -
ZMS/trunk/version.txt
r752 r792 1 ZMS 2.11.4-021 ZMS2 2.12.0-01
Note: See TracChangeset
for help on using the changeset viewer.
