[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Tue, 10 Apr 2007 20:05:24 -0000


raeburn		Tue Apr 10 16:05:24 2007 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  Use httpi for page header images and log-in page images. 
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.519 loncom/interface/loncommon.pm:1.520
--- loncom/interface/loncommon.pm:1.519	Thu Apr  5 17:36:15 2007
+++ loncom/interface/loncommon.pm	Tue Apr 10 16:05:21 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.519 2007/04/05 21:36:15 raeburn Exp $
+# $Id: loncommon.pm,v 1.520 2007/04/10 20:05:21 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3248,7 +3248,7 @@
     # See if there is a logo
     if ($designhash{$domain.'.login.domlogo'} ne '') {
         my $imgsrc = $designhash{$domain.'.login.domlogo'};
-        if ($imgsrc =~ /^\/adm/) {
+        if ($imgsrc =~ /^\/(adm|res)/) {
             $imgsrc = &lonhttpdurl($imgsrc);
         } 
         return '<img src="'.$imgsrc.'" alt="'.$domain.'" />';
@@ -3290,11 +3290,19 @@
     }
     $domain=&determinedomain($domain);
     my %domdesign = &get_domainconf($domain);
+    my $output;
     if ($domdesign{$domain.'.'.$which} ne '') {
-	return $domdesign{$domain.'.'.$which};
+	$output = $domdesign{$domain.'.'.$which};
     } else {
-        return $defaultdesign{$which};
+        $output = $defaultdesign{$which};
+    }
+    if (($which =~ /^(student|coordinator|author|admin)\.img$/) ||
+        ($which =~ /login\.(img|logo|domlogo)/)) {
+        if ($output =~ /^\/(adm|res)\//) {
+            $output = &lonhttpdurl($output);
+        }
     }
+    return $output;
 }
 
 ###############################################