version 1.291, 2002/10/03 22:32:53
|
version 1.293, 2002/10/07 20:24:38
|
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 ¤tversion(&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 { |
Line 2814 sub metadata {
|
Line 2838 sub metadata {
|
|
|
$uri=&declutter($uri); |
$uri=&declutter($uri); |
# if it is a non metadata possible uri return quickly |
# if it is a non metadata possible uri return quickly |
if (($uri eq '') || ($uri =~ m|^/*adm/|) || ($uri =~ m|/$|) || |
if (($uri eq '') || (($uri =~ m|^/*adm/|) && ($uri !~ m|^adm/includes|)) || |
($uri =~ m|/.meta$|)) { |
($uri =~ m|/$|) || ($uri =~ m|/.meta$|)) { |
return ''; |
return ''; |
} |
} |
my $filename=$uri; |
my $filename=$uri; |