Commit 3cf6d59a authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

add a backward compatibility code.

getFilename() should return existing source_reference value for old documents.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41748 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent daadc076
......@@ -787,3 +787,14 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixin,
if hasattr(aq_base(container), 'isIndexContent'):
return container.isIndexContent(self)
return False
# backward compatibility
def getFilename(self, default=None):
if self.hasFilename():
return self._baseGetFilename(default)
elif self.hasSourceReference():
filename = self._baseGetSourceReference(default)
self._setFilename(filename)
return filename
else:
return default
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