Commit 742519dd authored by Jean-Paul Smets's avatar Jean-Paul Smets

Better base URL generator

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13674 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 030278df
......@@ -1138,7 +1138,10 @@ class Document(XMLObject, UrlMixIn, ConversionCacheMixin, SnapshotMixin):
# If no base_url defined, define the base URL from our URL
base_url = self.asURL()
base_url_list = base_url.split('/')
if len(base_url_list): base_url = '/'.join(base_url_list[:-1])
if len(base_url_list):
if base_url_list[-1]:
# Cut the trailing part in http://www.some.site/at/trailing.html
base_url = '/'.join(base_url_list[:-1])
return base_url
# Alarm date calculation
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment