[Mpuls-commits] r1108 - wasko/branches/2.0/waskaweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Feb 1 18:24:05 CET 2010


Author: torsten
Date: 2010-02-01 18:24:03 +0100 (Mon, 01 Feb 2010)
New Revision: 1108

Modified:
   wasko/branches/2.0/waskaweb/controllers/document.py
Log:
* waskaweb/controllers/document.py
  (DocumentController.caseUploadAction): Deleted not called from
  anywhere now


Modified: wasko/branches/2.0/waskaweb/controllers/document.py
===================================================================
--- wasko/branches/2.0/waskaweb/controllers/document.py	2010-02-01 17:22:38 UTC (rev 1107)
+++ wasko/branches/2.0/waskaweb/controllers/document.py	2010-02-01 17:24:03 UTC (rev 1108)
@@ -113,36 +113,6 @@
             return self.globalUpload()
 
 
-    @checkRole('cm_ka')
-    def caseUploadAction(self):
-        try:
-            case = int(request.POST['case'])
-        except:
-            redirect_to(controller="case", action="documents") 
-
-        try:
-            doc = Document()
-            myfile = None
-            try:
-                myfile = request.POST.get('file')
-                if not myfile is None:
-                    doc.create(myfile.filename, myfile.file, case)
-                    c.success_for = SET_ATTACHMENT_SUCCESS_HEADER
-                    c.success_text = SET_ATTACHMENT_SUCCESS_TEXT
-                    c.url_ok = h.url_for(controller="document", action="caseUploadAction")
-                    return render('/documents/dialogs/success_attachment.mako')
-            finally:
-                if not myfile is None:
-                    try: myfile.file.close()
-                    except: pass
-        except:
-            traceback.print_exc(file=sys.stderr)
-            c.failed_for = SET_ATTACHMENT_FAILED_HEADER
-            c.failed_text = SET_ATTACHMENT_FAILED_TEXT
-            c.url_ok = h.url_for(controller="case", action="newDocument", id=case)
-            return render('/documents/dialogs/failed_attachment.mako')
- 
-
     @checkRole(('admin_ka', 'cm_ka'))
     def globalShow(self, id):
         id = self._checkInt(id)



More information about the Mpuls-commits mailing list