Last change
on this file since 47 was
1,
checked in by myroslav, 19 years ago
|
Building directory structure
|
File size:
703 bytes
|
Rev | Line | |
---|
[1] | 1 | ## Script (Python) "create_verify_file" |
---|
| 2 | ##bind container=container |
---|
| 3 | ##bind context=context |
---|
| 4 | ##bind namespace= |
---|
| 5 | ##bind script=script |
---|
| 6 | ##bind subpath=traverse_subpath |
---|
| 7 | ##parameters= |
---|
| 8 | ##title=Create file for verification |
---|
| 9 | ## |
---|
| 10 | |
---|
| 11 | from Products.CMFCore.utils import getToolByName |
---|
| 12 | props = getToolByName(context,'portal_properties').googlesitemap_properties |
---|
| 13 | |
---|
| 14 | portal = getToolByName(context,'portal_url').getPortalObject() |
---|
| 15 | try: |
---|
| 16 | if portal[props.verification_filename].CreatedBy == 'qPloneGoogleSitemaps': |
---|
| 17 | portal.manage_delObjects(props.verification_filename) |
---|
| 18 | except: |
---|
| 19 | pass |
---|
| 20 | |
---|
| 21 | props.manage_changeProperties(verification_filename = '') |
---|
| 22 | |
---|
| 23 | return state.set(portal_status_message = 'Plone Google Sitemap updated.') |
---|
Note: See
TracBrowser
for help on using the repository browser.