File:  [LON-CAPA] / loncom / interface / lonmenu.pm
Revision 1.39: download - view: text, annotated - select for diffs
Fri Feb 14 21:22:04 2003 UTC (21 years, 3 months ago) by www
Branches: MAIN
CVS tags: HEAD
Menu now on top of administrative pages and homework when in textual interface
mode.

    1: # The LearningOnline Network with CAPA
    2: # Routines to control the menu
    3: #
    4: # $Id: lonmenu.pm,v 1.39 2003/02/14 21:22:04 www Exp $
    5: #
    6: # Copyright Michigan State University Board of Trustees
    7: #
    8: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
    9: #
   10: # LON-CAPA is free software; you can redistribute it and/or modify
   11: # it under the terms of the GNU General Public License as published by
   12: # the Free Software Foundation; either version 2 of the License, or
   13: # (at your option) any later version.
   14: #
   15: # LON-CAPA is distributed in the hope that it will be useful,
   16: # but WITHOUT ANY WARRANTY; without even the implied warranty of
   17: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   18: # GNU General Public License for more details.
   19: #
   20: # You should have received a copy of the GNU General Public License
   21: # along with LON-CAPA; if not, write to the Free Software
   22: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   23: #
   24: # /home/httpd/html/adm/gpl.txt
   25: #
   26: # http://www.lon-capa.org/
   27: #
   28: # (TeX Conversion Module
   29: #
   30: # 05/29/00,05/30 Gerd Kortemeyer)
   31: #
   32: # 10/05,05/28,05/30,06/01,06/08,06/09,07/04,08/07 Gerd Kortemeyer
   33: # 02/15/02 Matthew Hall
   34: 
   35: package Apache::lonmenu;
   36: 
   37: use strict;
   38: use Apache::lonnet;
   39: use Apache::Constants qw(:common);
   40: use Apache::loncommon;
   41: use Apache::File;
   42: use vars qw(@desklines $readdesk);
   43: 
   44: # ======================================================= Make the menu buttons
   45: 
   46: sub menubuttons {
   47:     my $forcereg=shift;
   48:     my $target  =shift;
   49:     unless ($ENV{'browser.interface'} eq 'textual') { return ''; }
   50:     my $output='<a href="/adm/menu">Main Menu</a><br />';
   51:     return $output."<hr />";
   52: }
   53: 
   54: # ============================================== Register a URL with the remote
   55: 
   56: 
   57: sub registerurl {
   58:     my $forcereg=shift;
   59:     my $target = shift;
   60:     my $result = '';
   61:     
   62:     if ($target eq 'edit') {
   63:         $result .="<script type=\"text/javascrtipt\">\n".
   64:             "if (typeof swmenu != 'undefined') {swmenu.currentURL=null;}\n".
   65:             &Apache::loncommon::browser_and_searcher_javascript().
   66:                 "\n</script>\n";
   67:     }
   68:     if (($ENV{'browser.interface'} eq 'textual') ||
   69:         ((($ENV{'request.publicaccess'}) || 
   70:          (!&Apache::lonnet::is_on_map($ENV{'REQUEST_URI'}))) &&
   71:         (!$forcereg))) {
   72: 	return $result.
   73:          '<script type="text/javascript">function LONCAPAreg(){;} function LONCAPAstale(){}</script>';
   74:     }
   75:     if ($Apache::lonxml::registered && !$forcereg) { return ''; }
   76:     $Apache::lonxml::registered=1;
   77:     my $reopen=&Apache::lonmenu::reopenmenu();
   78:     my $newmail='';
   79:     if (&Apache::lonmsg::newmail()) { 
   80:        $newmail='swmenu.setstatus("you have","messages");';
   81:     }
   82:     my $timesync='swmenu.syncclock(1000*'.time.');';
   83:     if (($ENV{'REQUEST_URI'}!~/^\/(res\/)*adm\//) || ($forcereg)) {
   84:         my $hwkadd='';
   85:         if ($ENV{'request.filename'}=~/\.(problem|exam|quiz|assess|survey|form)$/) {
   86: 	    if (&Apache::lonnet::allowed('vgr',$ENV{'request.course.id'})) {
   87: 		$hwkadd.=(<<ENDSUBM);
   88:                      swmenu.switchbutton(7,1,'subm.gif','view sub','missions','gocmd("/adm/grades","submission")',
   89:                      'View user submissions for this assessment resource');
   90: ENDSUBM
   91:             }
   92: 	    if (&Apache::lonnet::allowed('mgr',$ENV{'request.course.id'})) {
   93: 		$hwkadd.=(<<ENDGRDS);
   94:                      swmenu.switchbutton(7,2,'pgrd.gif','problem','grades','gocmd("/adm/grades","gradingmenu")',
   95:                      'Modify user grades for this assessment resource');
   96: ENDGRDS
   97:             }
   98: 	    if (&Apache::lonnet::allowed('opa',$ENV{'request.course.id'})) {
   99: 		$hwkadd.=(<<ENDPARM);
  100:                      swmenu.switchbutton(7,3,'pparm.gif','problem','parms','gocmd("/adm/parmset","set")',
  101:                      'Modify deadlines, etc, for this assessment resource');
  102: ENDPARM
  103:             }
  104: 	}
  105:         ###
  106:         ### Determine whether or not to display the 'cstr' button for this
  107:         ### resource
  108:         ###
  109:         my $editbutton = '';
  110:         if ($ENV{'user.author'}) {
  111:             if ($ENV{'request.role'}=~/^(ca|au)/) {
  112:                 # Set defaults for authors
  113:                 my ($top,$bottom) = ('con-','struct');
  114:                 my $action = "go('/priv/".$ENV{'user.name'}."');";
  115:                 my $cadom  = $ENV{'request.role.domain'};
  116:                 my $caname = $ENV{'user.name'};
  117:                 my $desc = "Enter my resource construction space";
  118:                 # Set defaults for co-authors
  119:                 if ($ENV{'request.role'} =~ /^ca/) { 
  120:                     ($cadom,$caname)=($ENV{'request.role'}=~/(\w+)\/(\w+)$/);
  121:                     ($top,$bottom) = ('co con-','struct');
  122:                     $action = "go('/priv/".$caname."');";
  123:                     $desc = "Enter construction space as co-author";
  124:                 }
  125:                 # Check that we are on the correct machine
  126:                 my $home = &Apache::lonnet::homeserver($caname,$cadom);
  127:                 if ($home eq $Apache::lonnet::perlvar{'lonHostID'}) {
  128:                     $editbutton=&Apache::lonmenu::switch
  129:                         ('','',6,1,$top,,$bottom,$action,$desc);
  130:                 }
  131:             }
  132:             ##
  133:             ## Determine if user can edit url.
  134:             ##
  135:             my $cfile='';
  136:             my $cfuname='';
  137:             my $cfudom='';
  138:             if ($ENV{'request.filename'}) {
  139:                 my $file=&Apache::lonnet::declutter($ENV{'request.filename'});
  140:                 $file=~s/^(\w+)\/(\w+)/\/priv\/$2/;
  141:                 # Chech that the user has permission to edit this resource
  142:                 ($cfuname,$cfudom)=&Apache::loncacc::constructaccess($file,$1);
  143:                 if (defined($cfudom)) {
  144:                     if (&Apache::lonnet::homeserver($cfuname,$cfudom) 
  145:                         eq $Apache::lonnet::perlvar{'lonHostID'}) {
  146:                         $cfile=$file;
  147:                     }
  148:                 }
  149:             }        
  150:             # Finally, turn the button on or off
  151:             if ($cfile) {
  152:                 $editbutton=&Apache::lonmenu::switch
  153:                     ('','',6,1,'cstr.gif','edit','resource',
  154:                      "go('".$cfile."');","Edit this resource");
  155:             } elsif ($editbutton eq '') {
  156:                 $editbutton = '    swmenu.clearbut(6,1);';
  157:             }
  158:         }
  159:         ###
  160:         ###
  161: 	$result = (<<ENDREGTHIS);
  162:      
  163: <script language="JavaScript">
  164: // BEGIN LON-CAPA Internal
  165: 
  166:     function LONCAPAreg() {
  167: 	  swmenu=$reopen;
  168:           swmenu.clearTimeout(swmenu.menucltim);
  169:           $timesync
  170:           $newmail
  171: 	  swmenu.currentURL=window.location.pathname;
  172:           swmenu.reloadURL=window.location.pathname;
  173:           swmenu.currentSymb="$ENV{'request.symb'}";
  174:           swmenu.reloadSymb="$ENV{'request.symb'}";
  175:           swmenu.currentStale=0;
  176:           swmenu.clearbut(3,1);
  177:           swmenu.switchbutton
  178:        (6,3,'catalog.gif','catalog','info','catalog_info()','Show catalog information');
  179:           swmenu.switchbutton
  180:        (8,1,'eval.gif','evaluate','this','gopost("/adm/evaluate",currentURL)','Provide my evaluation of this resource');
  181:           swmenu.switchbutton
  182:     (8,2,'fdbk.gif','feedback','discuss','gopost("/adm/feedback",currentURL)','Provide feedback messages or contribute to the course discussion about this resource');
  183:           swmenu.switchbutton
  184:      (8,3,'prt.gif','prepare','printout','gopost("/adm/printout",currentURL)','Prepare a printable document');
  185:           swmenu.switchbutton
  186:        (2,1,'back.gif','backward','','gopost("/adm/flip","back:"+currentURL)','Go to the previous resource in the course sequence');
  187:           swmenu.switchbutton
  188:      (2,3,'forw.gif','forward','','gopost("/adm/flip","forward:"+currentURL)','Go to the next resource in the course sequence');
  189:           swmenu.switchbutton
  190:                             (9,1,'sbkm.gif','set','bookmark','set_bookmark()','Set a bookmark for this resource');
  191:           swmenu.switchbutton
  192:                          (9,2,'vbkm.gif','view','bookmark','edit_bookmarks()','Use or edit my bookmark collection');
  193:           swmenu.switchbutton
  194:                                (9,3,'anot.gif','anno-','tations','annotate()','Make notes and annotations about this resource');
  195:           $hwkadd
  196:           $editbutton
  197:     }
  198: 
  199:     function LONCAPAstale() {
  200: 	  swmenu=$reopen
  201:           swmenu.currentStale=1;
  202:           if (swmenu.reloadURL!='' && swmenu.reloadURL!= null) { 
  203:              swmenu.switchbutton
  204:              (3,1,'reload.gif','return','location','go(reloadURL)','Return to the last known location in the course sequence');
  205: 	  }
  206:           swmenu.clearbut(7,1);
  207:           swmenu.clearbut(7,2);
  208:           swmenu.clearbut(7,3);
  209:           swmenu.menucltim=swmenu.setTimeout(
  210:  'clearbut(2,1);clearbut(2,3);clearbut(8,1);clearbut(8,2);clearbut(8,3);'+
  211:  'clearbut(9,1);clearbut(9,2);clearbut(9,3);clearbut(6,3);clearbut(6,1)',
  212: 			  2000);
  213: 
  214:       }
  215: 
  216: // END LON-CAPA Internal
  217: </script>
  218: ENDREGTHIS
  219: 
  220:     } else {
  221:         $result = (<<ENDDONOTREGTHIS);
  222: 
  223: <script language="JavaScript">
  224: // BEGIN LON-CAPA Internal
  225: 
  226:     function LONCAPAreg() {
  227: 	  swmenu=$reopen
  228:           $timesync
  229:           swmenu.currentStale=1;
  230:           swmenu.clearbut(2,1);
  231:           swmenu.clearbut(2,3);
  232:           swmenu.clearbut(8,1);
  233:           swmenu.clearbut(8,2);
  234:           swmenu.clearbut(8,3);
  235:           if (swmenu.currentURL) {
  236:              swmenu.switchbutton
  237:               (3,1,'reload.gif','return','location','go(currentURL)');
  238:  	  } else {
  239: 	      swmenu.clearbut(3,1);
  240:           }
  241:     }
  242: 
  243:     function LONCAPAstale() {
  244:     }
  245: 
  246: // END LON-CAPA Internal
  247: </script>
  248: ENDDONOTREGTHIS
  249:     }
  250:     return $result;
  251: }
  252: 
  253: sub loadevents() {
  254:     return 'LONCAPAreg();';
  255: }
  256: 
  257: sub unloadevents() {
  258:     return 'LONCAPAstale();';
  259: }
  260: 
  261: # ============================================================= Start up remote
  262: 
  263: sub startupremote {
  264:     my ($lowerurl)=@_;
  265:     if ($ENV{'browser.interface'} eq 'textual') {
  266:      return ('<meta HTTP-EQUIV="Refresh" CONTENT="0.5; url='.$lowerurl.'" />');
  267:     }
  268:     my $configmenu=&rawconfig();
  269:     return(<<ENDREMOTESTARTUP);
  270: <script>
  271: 
  272: function wheelswitch() {
  273:    if (window.status=='|') { 
  274:       window.status='/'; 
  275:    } else {
  276:       if (window.status=='/') {
  277:          window.status='-';
  278:       } else {
  279:          if (window.status=='-') { 
  280:             window.status='\\\\'; 
  281:          } else {
  282:             if (window.status=='\\\\') { window.status='|'; }
  283:          }
  284:       }
  285:    } 
  286: }
  287: 
  288: // ---------------------------------------------------------- The wait function
  289: var canceltim;
  290: function wait() {
  291:    if ((menuloaded==1) || (tim==1)) {
  292:       window.status='Done.';
  293:       if (tim==0) {
  294:          clearTimeout(canceltim);
  295:          $configmenu
  296:          window.location='$lowerurl';  
  297:       } else {
  298:          alert("Remote Control timed out. It is possible that it was blocked by pop-up window filters.");
  299:       }
  300:    } else {
  301:       wheelswitch();
  302:       setTimeout('wait();',200);
  303:    }
  304: }
  305: 
  306: function main() {
  307:    canceltim=setTimeout('tim=1;',60000);
  308:    window.status='-';
  309:    wait();
  310: }
  311: 
  312: </script>
  313: ENDREMOTESTARTUP
  314: }
  315: 
  316: sub setflags() {
  317:     return(<<ENDSETFLAGS);
  318: <script>
  319:     menuloaded=0;
  320:     tim=0;
  321: </script>
  322: ENDSETFLAGS
  323: }
  324: 
  325: sub maincall() {
  326:     if ($ENV{'browser.interface'} eq 'textual') { return ''; }
  327:     return(<<ENDMAINCALL);
  328: <script>
  329:     main();
  330: </script>
  331: ENDMAINCALL
  332: }
  333: # ================================================================= Reopen menu
  334: 
  335: sub reopenmenu {
  336:    my $nothing='';
  337:    if ($ENV{'browser.interface'} eq 'textual') { return ''; }
  338:    my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'};
  339:    if ($ENV{'browser.type'} eq 'explorer') { $nothing='javascript:void(0);'; }
  340:    return('window.open("'.$nothing.'","'.$menuname.'","",false);');
  341: } 
  342: 
  343: # =============================================================== Open the menu
  344: 
  345: sub open {
  346:     my $returnval='';
  347:     if ($ENV{'browser.interface'} eq 'textual') { return ''; }
  348:     my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'};
  349:     unless (shift eq 'unix') {
  350: # resizing does not work on linux because of virtual desktop sizes
  351:        $returnval.=(<<ENDRESIZE);
  352: if (window.screen) {
  353:     self.resizeTo(screen.availWidth-215,screen.availHeight-55);
  354:     self.moveTo(190,15);
  355: }
  356: ENDRESIZE
  357:     }
  358:     $returnval.=(<<ENDOPEN);
  359: window.status='Opening LON-CAPA Remote Control';
  360: var menu=window.open("/res/adm/pages/menu.html","$menuname",
  361: "height=350,width=150,scrollbars=no,menubar=no,top=5,left=5,screenX=5,screenY=5");
  362: ENDOPEN
  363:     return '<script>'.$returnval.'</script>';
  364: }
  365: 
  366: 
  367: # ================================================================== Raw Config
  368: 
  369: sub clear {
  370:     my ($row,$col)=@_;
  371:     unless ($ENV{'browser.interface'} eq 'textual') {
  372:        return "\n".qq(window.status+='.';swmenu.clearbut($row,$col););
  373:    } else { return ''; }
  374: }
  375: 
  376: # Switch acts on the javascript that is executed when a button is clicked.  
  377: # The javascript is usually similar to "go('/adm/roles')" or "cstrgo(..)".
  378: sub switch {
  379:     my ($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc)=@_;
  380:     $act=~s/\$uname/$uname/g;
  381:     $act=~s/\$udom/$udom/g;
  382:     unless ($ENV{'browser.interface'} eq 'textual') {
  383:        return "\n".
  384:  qq(window.status+='.';swmenu.switchbutton($row,$col,"$img","$top","$bot","$act","$desc"););
  385:    } else {
  386:        my $text=$top.' '.$bot;
  387:        $text=~s/\- //;
  388:        return '<br /><a href="javascript:'.$act.';">'.$text.'</a> '.$desc;
  389:    }
  390: }
  391: 
  392: sub secondlevel {
  393:     my $output='';
  394:     my 
  395:     ($uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc)=@_;
  396:     if ($prt eq 'any') {
  397: 	   $output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc);
  398:     } elsif ($prt=~/^r(\w+)/) {
  399:         if ($rol eq $1) {
  400:            $output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc);
  401:         }
  402:     }
  403:     return $output;
  404: }
  405: 
  406: sub openmenu {
  407:     my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'};
  408:     if ($ENV{'browser.interface'} eq 'textual') { return ''; }
  409:     if ($ENV{'browser.type'} eq 'explorer') {
  410:        return "window.open('javascript:void(0);','".$menuname."');";
  411:    } else {
  412:        return "window.open('','".$menuname."');";
  413:    }
  414: }
  415: 
  416: sub rawconfig {
  417:     my $textualoverride=shift;
  418:     my $output='';
  419:     unless ($ENV{'browser.interface'} eq 'textual') {
  420:        $output.=
  421:  "window.status='Opening Remote Control';var swmenu=".&openmenu().
  422: "\nwindow.status='Configuring Remote Control ';";
  423:     } else {
  424:        unless ($textualoverride) { return ''; }
  425:     }
  426:     my $uname=$ENV{'user.name'};
  427:     my $udom=$ENV{'user.domain'};
  428:     my $adv=$ENV{'user.adv'};
  429:     my $author=$ENV{'user.author'};
  430:     my $crs='';
  431:     if ($ENV{'request.course.id'}) {
  432:        $crs='/'.$ENV{'request.course.id'};
  433:        if ($ENV{'request.course.sec'}) {
  434: 	   $crs.='_'.$ENV{'request.course.sec'};
  435:        }
  436:        $crs=~s/\_/\//g;
  437:     }
  438:     my $pub=($ENV{'request.state'} eq 'published');
  439:     my $con=($ENV{'request.state'} eq 'construct');
  440:     my $rol=$ENV{'request.role'};
  441:     my $requested_domain = $ENV{'request.role.domain'};
  442:     foreach (@desklines) {
  443:         my ($row,$col,$pro,$prt,$img,$top,$bot,$act,$desc)=split(/\:/,$_);
  444:         $prt=~s/\$uname/$uname/g;
  445:         $prt=~s/\$udom/$udom/g;
  446:         $prt=~s/\$crs/$crs/g; 
  447:         $prt=~s/\$requested_domain/$requested_domain/g;
  448:         if ($pro eq 'clear') {
  449: 	    $output.=&clear($row,$col);
  450:         } elsif ($pro eq 'any') {
  451:                $output.=&secondlevel(
  452: 	  $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc);
  453: 	} elsif ($pro eq 'smp') {
  454:             unless ($adv) {
  455:                $output.=&secondlevel(
  456:           $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc);
  457:             }
  458:         } elsif ($pro eq 'adv') {
  459:             if ($adv) {
  460:                $output.=&secondlevel(
  461: 	  $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc);
  462:             }
  463:         } elsif (($pro=~/p(\w+)/) && ($prt)) {
  464: 	    if (&Apache::lonnet::allowed($1,$prt)) {
  465:                $output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc);
  466:             }
  467:         } elsif ($pro eq 'course') {
  468:             if ($ENV{'request.course.fn'}) {
  469:                $output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc);
  470: 	    }
  471:         } elsif ($pro eq 'author') {
  472:             if ($author) {
  473:                 if ((($prt eq 'rca') && ($ENV{'request.role'}=~/^ca/)) ||
  474:                     (($prt eq 'rau') && ($ENV{'request.role'}=~/^au/))) {
  475:                     # Check that we are on the correct machine
  476:                     my $cadom=$requested_domain;
  477:                     my $caname=$ENV{'user.name'};
  478:                     if ($prt eq 'rca') {
  479: 		       ($cadom,$caname)=
  480:                                ($ENV{'request.role'}=~/(\w+)\/(\w+)$/);
  481:                     }                       
  482:                     $act =~ s/\$caname/$caname/g;
  483:                     my $home = &Apache::lonnet::homeserver($caname,$cadom);
  484:                     if ($home eq $Apache::lonnet::perlvar{'lonHostID'}) {
  485:                         $output.=switch($caname,$cadom,
  486:                                         $row,$col,$img,$top,$bot,$act,$desc);
  487:                     }
  488:                 }
  489:             }
  490:         }
  491:     }
  492:     unless ($ENV{'browser.interface'} eq 'textual') {
  493:        $output.="\nwindow.status='Synchronizing Time';swmenu.syncclock(1000*".time.");\nwindow.status='Remote Control Configured.';";
  494:     }
  495:     return $output;
  496: }
  497: 
  498: # ======================================================================= Close
  499: 
  500: sub close {
  501:     if ($ENV{'browser.interface'} eq 'textual') { return ''; }
  502:     my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'};
  503:     return(<<ENDCLOSE);
  504: <script>
  505: window.status='Accessing Remote Control';
  506: menu=window.open("/adm/rat/empty.html","$menuname",
  507:                  "height=350,width=150,scrollbars=no,menubar=no");
  508: window.status='Disabling Remote Control';
  509: menu.active=0;
  510: menu.autologout=0;
  511: window.status='Closing Remote Control';
  512: menu.close();
  513: window.status='Done.';
  514: </script>
  515: ENDCLOSE
  516: }
  517: 
  518: # ====================================================================== Footer
  519: 
  520: sub footer {
  521: 
  522: }
  523: 
  524: # ================================================ Handler when called directly
  525: 
  526: 
  527: sub handler {
  528:     my $r = shift;
  529:     $r->content_type('text/html');
  530:     $r->send_http_header;
  531:     return OK if $r->header_only;
  532: 
  533:     my $bodytag=&Apache::loncommon::bodytag('Main Menu');
  534: # ------------------------------------------------------------ Print the screen
  535:     $r->print(<<ENDHEADER);
  536: <html><head>
  537: <title>LON-CAPA Main Menu</title>
  538: <script>
  539: function go(url) {
  540:     window.location=url;
  541: }
  542: function gopost(url) {
  543:     window.location=url;
  544: }
  545: </script>
  546: </head>
  547: $bodytag
  548: ENDHEADER
  549:     $r->print(&rawconfig(1));
  550:     $r->print('</body></html>');
  551:     return OK;
  552: }
  553: 
  554: # ================================================================ Main Program
  555: 
  556: BEGIN {
  557:   if (! defined($readdesk)) {
  558:    {
  559:     my $config=Apache::File->new($Apache::lonnet::perlvar{'lonTabDir'}.
  560: 				  '/mydesk.tab');
  561:     while (my $configline=<$config>) {
  562:        $configline=(split(/\#/,$configline))[0];
  563:        $configline=~s/^\s+//;
  564:        chomp($configline);
  565:        if ($configline) {
  566:           $desklines[$#desklines+1]=$configline;
  567:        }
  568:     }
  569:    }
  570:    $readdesk='done';
  571:   }
  572: }
  573: 
  574: 1;
  575: __END__
  576: 
  577: 
  578: 
  579: 
  580: 
  581: 
  582: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>