web/views/idownloadable.py
changeset 3460 e4843535db25
parent 3451 6b46d73823f5
child 3890 d7a270f50f54
--- a/web/views/idownloadable.py	Thu Sep 24 00:23:32 2009 +0200
+++ b/web/views/idownloadable.py	Thu Sep 24 00:24:21 2009 +0200
@@ -26,7 +26,7 @@
     return 1
 
 def download_box(w, entity, title=None, label=None):
-    req = entity.req
+    req = entity._cw
     w(u'<div class="sideBox">')
     if title is None:
         title = req._('download')
@@ -104,9 +104,9 @@
         self.w(u'<div class="content">')
         contenttype = entity.download_content_type()
         if contenttype.startswith('image/'):
-            self.wview('image', entity.rset, row=entity.row)
+            self.wview('image', entity.cw_rset, row=entity.cw_row)
         else:
-            self.wview('downloadlink', entity.rset, title=self._cw._('download'), row=entity.row)
+            self.wview('downloadlink', entity.cw_rset, title=self._cw._('download'), row=entity.cw_row)
             try:
                 if ENGINE.has_input(contenttype):
                     self.w(entity.printable_value('data'))