Diff for /loncom/lonnet/perl/lonnet.pm between versions 1.291 and 1.292

version 1.291, 2002/10/03 22:32:53 version 1.292, 2002/10/07 13:50:36
Line 644  sub chatsend { Line 644  sub chatsend {
    &escape($newentry)),$chome);     &escape($newentry)),$chome);
 }  }
   
   # ------------------------------------------ Find current version of a resource
   
   sub getversion {
       my $fname=&clutter(shift);
       unless ($fname=~/^\/res\//) { return -1; }
       return &currentversion(&filelocation('',$fname));
   }
   
   sub currentversion {
       my $fname=shift;
       my $author=$fname;
       $author=~s/\/home\/httpd\/html\/res\/([^\/]*)\/([^\/]*).*/$1\/$2/;
       my ($udom,$uname)=split(/\//,$author);
       my $home=homeserver($uname,$udom);
       if ($home eq 'no_host') { 
           return -1; 
       }
       my $answer=reply("currentversion:$fname",$home);
       if (($answer eq 'con_lost') || ($answer eq 'rejected')) {
    return -1;
       }
       return $answer;
   }
   
 # ----------------------------- Subscribe to a resource, return URL if possible  # ----------------------------- Subscribe to a resource, return URL if possible
   
 sub subscribe {  sub subscribe {

Removed from v.1.291  
changed lines
  Added in v.1.292


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