version 1.10.2.78, 2012/01/03 09:26:45
|
version 1.10.2.81, 2012/01/09 13:14:46
|
Line 26 import email
|
Line 26 import email
|
import re |
import re |
from OFS.Cache import Cacheable |
from OFS.Cache import Cacheable |
import urllib2 |
import urllib2 |
|
import transaction |
from MPIWGHelper import * |
from MPIWGHelper import * |
#ersetzt logging |
#ersetzt logging |
def logger(txt,method,txt2): |
def logger(txt,method,txt2): |
Line 99 class MPIWGStaff(CatalogAware,ZSQLExtend
|
Line 99 class MPIWGStaff(CatalogAware,ZSQLExtend
|
|
|
def getKeyUTF8(self): |
def getKeyUTF8(self): |
"""get db_key utf8""" |
"""get db_key utf8""" |
|
logging.debug("KEY - MPIWGStaff:"+self.getKey()) |
|
logging.debug("KEY - MPIWGStaff:"+utf8ify(self.getKey())) |
|
|
return utf8ify(self.getKey()) |
return utf8ify(self.getKey()) |
|
|
def setKey(self,key): |
def setKey(self,key): |
Line 355 class MPIWGStaff(CatalogAware,ZSQLExtend
|
Line 358 class MPIWGStaff(CatalogAware,ZSQLExtend
|
|
|
return pt() |
return pt() |
|
|
def harvest_page(self): |
def harvest_page(self,mode="normal"): |
"""harvest""" |
"""harvest""" |
|
|
if not self.isPublished(): |
if not self.isPublished(): |
return "" |
return |
st = getattr(self.en.staff.members,self.getId()).index_html() |
st = getattr(self.en.staff.members,self.getId()).index_html(mode) |
return st |
|
|
|
|
templates = self.en.getHarvestCache() |
|
#templates = getattr(self,'getHarvestCache',self.en.getHarvestCache)() |
|
rendered = st |
|
templates[self.absolute_url()]=rendered |
|
transaction.commit() |
|
return rendered |
|
|
def index_html(self): |
|
|
|
|
def index_html(self,mode="normal"): |
"""show homepage""" |
"""show homepage""" |
|
|
bound_names={} |
bound_names={} |
Line 394 class MPIWGStaff(CatalogAware,ZSQLExtend
|
Line 405 class MPIWGStaff(CatalogAware,ZSQLExtend
|
pt = getattr(self, "index.html") |
pt = getattr(self, "index.html") |
# else use template |
# else use template |
else: |
else: |
|
if mode=="slim": |
|
pt = getTemplate(self, "members_main_slim") |
|
else: |
pt = getTemplate(self, "members_main") |
pt = getTemplate(self, "members_main") |
# Execute the template in a new security context. |
# Execute the template in a new security context. |
security.addContext(self) |
security.addContext(self) |