This is an automated notification sent by LCG Savannah.
It relates to:
                bugs #29803, project CDS Invenio

==============================================================================
 LATEST MODIFICATIONS of bugs #29803:
==============================================================================

Update of bug #29803 (project cdsware):

                  Status:                    None => Fixed                  
             Assigned to:                    nich => skaplun                
             Open/Closed:                    Open => Closed                 


==============================================================================
 OVERVIEW of bugs #29803:
==============================================================================

URL:
  <http://savannah.cern.ch/bugs/?29803>

                 Summary: legacy getfile.py does not handle icons
appropriately
                 Project: CDS Invenio
            Submitted by: mmarino12
            Submitted on: 2007-09-23 23:14
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: Fixed
                 Privacy: Public
             Assigned to: skaplun
        Originator Email: 
             Open/Closed: Closed
         Discussion Lock: Any

    _______________________________________________________


within websubmit_webinterface.py

in def websubmit_legacy_getfile

        if name!="":
            if docid=="":
                return errorMsg(_("Parameter docid missing"), req, c, ln)

            doc = BibDoc(bibdocid=docid)
            docfile=doc.getFile(name,format,version)

            if docfile is None:
                return warningMsg(_("Unable to find file."),req, c, ln)

            # redirect to this specific file, possibly dropping
            # the version if we are referring to the latest one.
            target = '%s/record/%d/files/%s.%s' % (
                weburl, doc.recid, docfile.name, docfile.format)

If the document is an icon, doc.recid is None and this throws an exception. 
Icons are handled correctly in the record/<rec_id>/files/<icon_name> url.  

Also, in file.py, the legacy url is used:

existingIcon = self.getIcon()
        if existingIcon is not None:
            imagepath = "%s/getfile.py?docid=%s&name=%s&format=gif" %
(weburl,existingIcon.getId(),urllib.quote(existingIcon.getDocName()))

This can be changed to 

imagepath="%s/record/%s/files/%s.gif" %
(weburl,self.recid,urllib.quote(existingIcon.getDocName()))







    _______________________________________________________

Carbon-Copy List:

CC Address                          | Comment
------------------------------------+-----------------------------
2195                                | -UPD-
1576                                | -UPD-
2800                                | -SUB-




==============================================================================

This item URL is:
  <http://savannah.cern.ch/bugs/?29803>

_______________________________________________
  Message sent via/by LCG Savannah
  http://savannah.cern.ch/


Reply via email to