Last change
on this file was
1361,
checked in by mylan, 15 years ago
|
Fix #133: Added patch for prevent archive url of blog-posts
|
-
Property svn:eol-style set to
native
|
File size:
562 bytes
|
Line | |
---|
1 | from quills.app import utilities |
---|
2 | from quills.core.interfaces import IWeblogEntry |
---|
3 | |
---|
4 | def getArchivePathForNoArchive(obj, weblog_content): |
---|
5 | """See IWeblogView. |
---|
6 | """ |
---|
7 | weblog_path = weblog_content.getPhysicalPath() |
---|
8 | |
---|
9 | if IWeblogEntry.providedBy(obj): |
---|
10 | obj = obj.context |
---|
11 | |
---|
12 | obj_path = getattr(obj, 'getPath', None) |
---|
13 | if obj_path and callable(obj_path): |
---|
14 | obj_path = obj.getPath().split('/') |
---|
15 | else: |
---|
16 | obj_path = obj.getPhysicalPath() |
---|
17 | |
---|
18 | return obj_path[len(weblog_path):] |
---|
19 | |
---|
20 | utilities.getArchivePathFor = getArchivePathForNoArchive |
---|
Note: See
TracBrowser
for help on using the repository browser.