don't muck w/ media_prefix if it's unset
authorBill Erickson <berick@esilibrary.com>
Fri, 21 Jan 2011 15:20:36 +0000 (10:20 -0500)
committerBill Erickson <berick@esilibrary.com>
Fri, 21 Jan 2011 15:20:36 +0000 (10:20 -0500)
Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm

index 3929285..4980f79 100644 (file)
@@ -122,7 +122,7 @@ sub load_context {
         $ctx->{theme} . ' : locale = ' . $ctx->{locale});
 
     my $mprefix = $ctx->{media_prefix};
-    if($mprefix !~ /^http/ and $mprefix !~ /^\//) {
+    if($mprefix and $mprefix !~ /^http/ and $mprefix !~ /^\//) {
         # if a hostname is provided /w no protocol, match the protocol to the current page
         $ctx->{media_prefix} = ($cgi->https) ? "https://$mprefix" : "http://$mprefix";
     }