From: Paul Poulain <[email protected]>

return link to imageurl only if there is an imageurl
(before this patch, returned an incomplete path, resulting in a HTML error)
---
 admin/authorised_values.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/admin/authorised_values.pl b/admin/authorised_values.pl
index 30da72a..a264464 100755
--- a/admin/authorised_values.pl
+++ b/admin/authorised_values.pl
@@ -222,7 +222,7 @@ sub default_form {
                $row_data{category}         = $results->[$i]{'category'};
                $row_data{authorised_value} = 
$results->[$i]{'authorised_value'};
                $row_data{lib}              = $results->[$i]{'lib'};
-               $row_data{imageurl}         = getitemtypeimagelocation( 
'intranet', $results->[$i]{'imageurl'} );
+               $row_data{imageurl}         =  getitemtypeimagesrc('intranet') 
. '/' . $results->[$i]{'imageurl'} if $results->[$i]{'imageurl'};
                $row_data{edit}             = 
"$script_name?op=add_form&amp;id=".$results->[$i]{'id'}."&offset=$offset";
                $row_data{delete}           = 
"$script_name?op=delete_confirm&amp;searchfield=$searchfield&amp;id=".$results->[$i]{'id'}."&offset=$offset";
                push(@loop_data, \%row_data);
-- 
1.6.0.4

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to