Changeset 927


Ignore:
Timestamp:
09.03.2010 21:43:48 (2 years ago)
Author:
zmsdev
Message:

Added support for overwriting configuration of $ZMS_HOME/www/themes.zcml by $INSTANCE_HOME/etc/zms/www/themes.zcml

Location:
ZMS/trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • ZMS/trunk/_globals.py

    r919 r927  
    827827    return self.__attr_conf_dict__.get(key,default) 
    828828 
     829  def import_instance_home(self, this, url): 
     830    path = this.Control_Panel.getINSTANCE_HOME()+'/etc/zms/'+url 
     831    mode = 'b' 
     832    if os.path.exists(path): 
     833      f = None 
     834      try: 
     835        f = open( path, 'r'+mode) 
     836        data = f.read() 
     837      finally: 
     838        if f is not None: 
     839          f.close() 
     840      return data 
     841    return None 
     842 
    829843  def http_import(self, url, method='GET', auth=None, parse_qs=0): 
    830844    return http_import( self, url, method, auth, parse_qs) 
  • ZMS/trunk/changes.txt

    r924 r927  
    14751475+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
    14761476-------------------------------------------------- 
     14772010-03-09:zms2-2.12.1-18 
     1478[01320] Added support for overwriting configuration of $ZMS_HOME/www/themes.zcml by $INSTANCE_HOME/etc/zms/www/themes.zcml(requested by xm). 
     1479-------------------------------------------------- 
  • ZMS/trunk/manage_addzmsform.dtml

    r750 r927  
    154154  <select class="form-element" name="theme:required" onchange="themeChange(this);" onkeyup="themeChange(this);"> 
    155155 
    156     <dtml-in "_.range(99)" reverse> 
     156    <dtml-in "range(99)" reverse> 
    157157     <dtml-let idx=sequence-item> 
    158158      <dtml-try> 
     
    169169     <dtml-call "REQUEST.set('default_img_theme','spacer.gif')"> 
    170170    </dtml-unless> 
    171     <dtml-call "REQUEST.set('themes',misc_.zms['initutil'].http_import('%s/misc_/zms/themes.zcml'%BASE0.replace('https','http')))"> 
     171    <dtml-call "REQUEST.set('themes',None)"> 
     172    <dtml-if "REQUEST.get('themes') is None"><dtml-call "REQUEST.set('themes',misc_.zms['initutil'].import_instance_home(this(),'www/themes.zcml'))"></dtml-if> 
     173    <dtml-if "REQUEST.get('themes') is None"><dtml-call "REQUEST.set('themes',misc_.zms['initutil'].http_import('%s/misc_/zms/themes.zcml'%BASE0.replace('https','http')))"></dtml-if> 
    172174    <dtml-call "REQUEST.set('themes',misc_.zms['initutil'].re_search('source location=\042(.*?)\042/>',themes))"> 
    173175    <dtml-in themes> 
  • ZMS/trunk/version.txt

    r919 r927  
    1 ZMS2 2.12.1-16 
     1ZMS2 2.12.1-18 
Note: See TracChangeset for help on using the changeset viewer.