EPrints Technical Mailing List Archive
Message: #00801
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Patch for EPScript doc_size() and human_filesize() functions (3.2)
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Patch for EPScript doc_size() and human_filesize() functions (3.2)
- From: Mark Gregson <mark.gregson@qut.edu.au>
- Date: Wed, 27 Jun 2012 16:52:02 +1000
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. Cheers Mark Mark Gregson | Applications and Development Team Leader |
Attachment:
doc_size.patch
Description: doc_size.patch
- Follow-Ups:
- [EP-tech] Re: Patch for EPScript doc_size() and human_filesize() functions (3.2)
- From: Tim Brody <tdb2@ecs.soton.ac.uk>
- [EP-tech] Re: Patch for EPScript doc_size() and human_filesize() functions (3.2)
- Prev by Date: [EP-tech] Patch: handle NULL values in EPrints::Search::Condition::Comparison
- Next by Date: [EP-tech] creators_id required
- Previous by thread: [EP-tech] Patch: handle NULL values in EPrints::Search::Condition::Comparison
- Next by thread: [EP-tech] views_render to manipulate a views index
- Index(es):