[EP-tech] Patch for EPScript doc_size() and human_filesize() functions (3.2)

Mark Gregson mark.gregson at qut.edu.au
Wed Jun 27 07:52:02 BST 2012

The doc_size() EPScript function returns an integer instead of an array ref.  This causes expressions containing the function to break, e.g., 'doc_size($doc) lt 1000000'. The attached patch this by returning the appropriate array ref. It also adjusts human_filesize() so that it treats its argument as an array ref instead of an scalar integer. I also snuck in corrections to a couple of typos in related error message.

The patch is against 3.2. Looking at svn, it looks like the bug exists in 3.3 also but I've not tested the patch in 3.3.


Mark Gregson | Applications and Development Team Leader
Library eServices | Queensland University of Technology
Level 2 | R Block | Kelvin Grove Campus | GPO Box 2434 | Brisbane 4001
Phone: +61 7 3138 3782 | Web: http://eprints.qut.edu.au/<http://www.qut.edu.au/>
ABN: 83 791 724 622
CRICOS No: 00213J

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20120627/4182db67/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doc_size.patch
Type: application/octet-stream
Size: 1346 bytes
Desc: doc_size.patch
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20120627/4182db67/attachment.obj 

More information about the Eprints-tech mailing list