Diff for /loncom/lond between versions 1.166 and 1.167

version 1.166, 2003/12/22 11:03:37 version 1.167, 2003/12/22 11:29:58
Line 10 Line 10
 #  #
 # LON-CAPA is free software; you can redistribute it and/or modify  # LON-CAPA is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by  # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or  # the Free Software Foundation; either version 2 of the License, or 
 # (at your option) any later version.  # (at your option) any later version.
 #  #
 # LON-CAPA is distributed in the hope that it will be useful,  # LON-CAPA is distributed in the hope that it will be useful,
Line 476  sub ReinitProcess { Line 476  sub ReinitProcess {
     }      }
     return 'ok';      return 'ok';
 }  }
   #
   #   Called to edit a file
   #   Parameters:
   #      request           - The entire command/request sent by lonc or lonManage
   #   Return:
   #      The reply to send to the client.
   sub EditFile {
       my $request = shift;
   
       #  Split the command into it's pieces:  edit:filetype:script
   
       my ($request, $filetype, $script) = split(":", $request);
   
       #  Check the pre-coditions for success:
   
       if($request != "edit") { # Something is amiss afoot alack.
    return "error:edit request detected, but request != 'edit'\n";
       }
       if( ($filetype ne "hosts")  &&
    ($filetype ne "domain")) {
    return "error:edit requested with invalid file specifier: $filetype \n";
       }
   
       #   Split the edit script and check it's validity.
   
       #   Execute the edit operation.
   
   
       return "ok\n";
   }
 #  #
 #  Convert an error return code from lcpasswd to a string value.  #  Convert an error return code from lcpasswd to a string value.
 #  #
Line 1237  sub make_new_child { Line 1266  sub make_new_child {
                my($command, $filetype, $script) = split(/:/, $userinput);                 my($command, $filetype, $script) = split(/:/, $userinput);
                if (($filetype eq "hosts") || ($filetype eq "domain")) {                 if (($filetype eq "hosts") || ($filetype eq "domain")) {
                   if($script ne "") {                    if($script ne "") {
                      Reply($client,"ok\n",$userinput);       # DEBUG: Call EditFile here.        Reply($client, EditFile($userinput));
                   } else {                    } else {
                      Reply($client,"refused\n",$userinput);                       Reply($client,"refused\n",$userinput);
                   }                    }

Removed from v.1.166  
changed lines
  Added in v.1.167


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