Last change
on this file since 8 was
1,
checked in by myroslav, 19 years ago
|
Building directory structure
|
-
Property svn:eol-style set to
native
|
File size:
815 bytes
|
Line | |
---|
1 | ## Controller Python Script "prefs_adsense_script" |
---|
2 | ##bind container=container |
---|
3 | ##bind context=context |
---|
4 | ##bind namespace= |
---|
5 | ##bind script=script |
---|
6 | ##bind state=state |
---|
7 | ##bind subpath=traverse_subpath |
---|
8 | ##parameters= |
---|
9 | ##title=handles the adsense properties |
---|
10 | ## |
---|
11 | |
---|
12 | request = context.REQUEST |
---|
13 | portal_status_message="Changes not saved." |
---|
14 | |
---|
15 | customer_id = request.get('customer_id', None) |
---|
16 | if customer_id: |
---|
17 | from Products.CMFCore.utils import getToolByName |
---|
18 | pp = getToolByName(context, 'portal_properties') |
---|
19 | if pp and 'adsense_properties' in pp.objectIds() \ |
---|
20 | and pp.adsense_properties.hasProperty('customer_id'): |
---|
21 | pp.adsense_properties.manage_changeProperties(customer_id=str(customer_id)) |
---|
22 | portal_status_message="Changes saved." |
---|
23 | |
---|
24 | return state.set(status="success", portal_status_message=portal_status_message) |
---|
Note: See
TracBrowser
for help on using the repository browser.