From b327062492aefd6b7e890290bf5a6a7361cbe7c5 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Thu, 29 Sep 2011 18:40:47 +0200 Subject: [PATCH] work in progress: make cybertools package work with BlueBream 1.0 --- browser/loops/auth.py | 6 +++--- browser/loops/configure.zcml | 4 ++-- container/configure.zcml | 1 - setup.py | 1 + 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/browser/loops/auth.py b/browser/loops/auth.py index 854eb3a..b68258f 100644 --- a/browser/loops/auth.py +++ b/browser/loops/auth.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2006 Helmut Merz helmutm@cy55.de +# Copyright (c) 2011 Helmut Merz helmutm@cy55.de # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,7 +23,6 @@ $Id$ """ import urllib -from zope.app import zapi from zope.app.authentication.session import SessionCredentialsPlugin from zope.app.component import hooks from zope.app.i18n import ZopeMessageFactory as _ @@ -33,6 +32,7 @@ from zope.app.security.interfaces import ILogoutSupported from zope.cachedescriptors.property import Lazy from zope.i18n import translate from zope.publisher.interfaces.http import IHTTPRequest +from zope.traversing.browser import absoluteURL class LoopsSessionCredentialsPlugin(SessionCredentialsPlugin): @@ -49,7 +49,7 @@ class LoopsSessionCredentialsPlugin(SessionCredentialsPlugin): camefrom = request.getApplicationURL() + path if 'login' in camefrom: camefrom = '/'.join(camefrom.split('/')[:-1]) - url = '%s/@@%s?%s' % (zapi.absoluteURL(site, request), + url = '%s/@@%s?%s' % (absoluteURL(site, request), self.loginpagename, urllib.urlencode({'camefrom': camefrom})) request.response.redirect(url) diff --git a/browser/loops/configure.zcml b/browser/loops/configure.zcml index 6745f31..c30ceba 100644 --- a/browser/loops/configure.zcml +++ b/browser/loops/configure.zcml @@ -61,13 +61,13 @@ factory=".auth.LoopsSessionCredentialsPlugin" /> - + - + diff --git a/container/configure.zcml b/container/configure.zcml index b7d33e5..12d394a 100644 --- a/container/configure.zcml +++ b/container/configure.zcml @@ -29,7 +29,6 @@ template="../ajax/innerHtml.pt" class="cybertools.container.base.ContainerView" permission="zope.ManageContent" - menu="zmi_views" title="Contents" /> diff --git a/setup.py b/setup.py index fa72353..acf80d2 100644 --- a/setup.py +++ b/setup.py @@ -23,6 +23,7 @@ setup(name='cybertools', 'PIL', 'zope.app.catalog', 'zope.app.file', + 'zope.app.preview', 'zope.app.session', 'zope.sendmail', ],