Skip to content

Commit

Permalink
* Applied epscript fixes from Mark Gregson <mark.gregson@qut.edu.au>
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.eprints.org/eprints/trunk/system@7824 9491667e-5006-0410-a446-efbe8990b998
  • Loading branch information
Tim Brody authored and Sebastien Francois committed Jul 30, 2014
1 parent a62f650 commit 5672918
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions perl_lib/EPrints/Script/Compiled.pm
Expand Up @@ -500,7 +500,7 @@ sub run_doc_size

if( !defined $doc->[0] || ref($doc->[0]) ne "EPrints::DataObj::Document" )
{
$self->runtime_error( "Can only call document_size() on document objects not ".
$self->runtime_error( "Can only call doc_zie() on document objects not ".
ref($doc->[0]) );
}

Expand All @@ -511,7 +511,7 @@ sub run_doc_size

my %files = $doc->[0]->files;

return $files{$doc->[0]->get_main} || 0;
return [ $files{$doc->[0]->get_main} || 0, "INTEGER" ];
}

sub run_is_public
Expand All @@ -520,7 +520,7 @@ sub run_is_public

if( !defined $doc->[0] || ref($doc->[0]) ne "EPrints::DataObj::Document" )
{
$self->runtime_error( "Can only call document_size() on document objects not ".
$self->runtime_error( "Can only call is_public() on document objects not ".
ref($doc->[0]) );
}

Expand Down Expand Up @@ -584,7 +584,7 @@ sub run_human_filesize
{
my( $self, $state, $size_in_bytes ) = @_;

return [ EPrints::Utils::human_filesize( $size_in_bytes || 0 ), "INTEGER" ];
return [ EPrints::Utils::human_filesize( $size_in_bytes->[0] || 0 ), "INTEGER" ];
}

sub run_control_url
Expand Down

0 comments on commit 5672918

Please sign in to comment.