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

www lon-capa-cvs@mail.lon-capa.org
Mon, 08 Dec 2003 20:21:23 -0000


www		Mon Dec  8 15:21:23 2003 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  Bug #2443 - load buttons from lonhttpd
  Make buttons translatable
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.104 loncom/interface/lonmenu.pm:1.105
--- loncom/interface/lonmenu.pm:1.104	Mon Dec  8 10:02:34 2003
+++ loncom/interface/lonmenu.pm	Mon Dec  8 15:21:23 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.104 2003/12/08 15:02:34 raeburn Exp $
+# $Id: lonmenu.pm,v 1.105 2003/12/08 20:21:23 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -645,6 +645,7 @@
     $top=&mt($top);
     $bot=&mt($bot);
     $desc=&mt($desc);
+    $img=&mt($img);
     unless (($ENV{'browser.interface'} eq 'textual')  ||
             ($ENV{'environment.remote'} eq 'off')) {
 # Remote
@@ -667,8 +668,12 @@
        if ($nobreak==2) { return ''; }
        my $text=$top.' '.$bot;
        $text=~s/\s*\-\s*//gs;
+
+       my $lonhttpdPort=$Apache::lonnet::perlvar{'lonhttpdPort'};
+       if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; }
        my $pic=
-	   '<img border="0" alt="'.$text.'" src="/res/adm/pages/'.$img.'" align="'.
+	   '<img border="0" alt="'.$text.'" src="http://'.$ENV{'HTTP_HOST'}.
+	   ':'.$lonhttpdPort.'/res/adm/pages/'.$img.'" align="'.
 	   ($nobreak==3?'right':'left').'" />';
        if (($ENV{'browser.interface'} eq 'textual') || ($ENV{'browser.interface'} eq 'faketextual')) {
 # Accessibility