version 1.907, 2007/08/21 23:34:38
|
version 1.910.2.1, 2007/09/25 00:26:20
|
Line 861 sub inst_directory_query {
|
Line 861 sub inst_directory_query {
|
my $udom = $srch->{'srchdomain'}; |
my $udom = $srch->{'srchdomain'}; |
my %results; |
my %results; |
my $homeserver = &domain($udom,'primary'); |
my $homeserver = &domain($udom,'primary'); |
|
my $outcome; |
if ($homeserver ne '') { |
if ($homeserver ne '') { |
my $queryid=&reply("querysend:instdirsearch:". |
my $queryid=&reply("querysend:instdirsearch:". |
&escape($srch->{'srchby'}).':'. |
&escape($srch->{'srchby'}).':'. |
Line 880 sub inst_directory_query {
|
Line 881 sub inst_directory_query {
|
} |
} |
|
|
if (!&error($response) && $response ne 'refused') { |
if (!&error($response) && $response ne 'refused') { |
my @matches = split(/\n/,$response); |
if ($response eq 'unavailable') { |
foreach my $match (@matches) { |
$outcome = $response; |
my ($key,$value) = split(/=/,$match); |
} else { |
$results{&unescape($key).':'.$udom} = &thaw_unescape($value); |
$outcome = 'ok'; |
|
my @matches = split(/\n/,$response); |
|
foreach my $match (@matches) { |
|
my ($key,$value) = split(/=/,$match); |
|
$results{&unescape($key).':'.$udom} = &thaw_unescape($value); |
|
} |
} |
} |
} |
} |
} |
} |
return %results; |
return ($outcome,%results); |
} |
} |
|
|
sub usersearch { |
sub usersearch { |
Line 1217 sub do_cache_new {
|
Line 1223 sub do_cache_new {
|
$time=600; |
$time=600; |
} |
} |
if ($debug) { &Apache::lonnet::logthis("Setting $id to $value"); } |
if ($debug) { &Apache::lonnet::logthis("Setting $id to $value"); } |
if (!($memcache->set($id,$setvalue,$time))) { |
my $result = $memcache->set($id,$setvalue,$time); |
|
if (! $result) { |
&logthis("caching of id -> $id failed"); |
&logthis("caching of id -> $id failed"); |
|
$memcache->disconnect_all(); |
} |
} |
# need to make a copy of $value |
# need to make a copy of $value |
#&make_room($id,$value,$debug); |
#&make_room($id,$value,$debug); |
Line 6696 sub metadata {
|
Line 6704 sub metadata {
|
# only ws inside the tag, and not in default, so use default |
# only ws inside the tag, and not in default, so use default |
# as value |
# as value |
$metaentry{':'.$unikey}=$default; |
$metaentry{':'.$unikey}=$default; |
} else { |
} elsif ( $internaltext =~ /\S/ ) { |
# either something interesting inside the tag or default |
# something interesting inside the tag |
# uninteresting |
|
$metaentry{':'.$unikey}=$internaltext; |
$metaentry{':'.$unikey}=$internaltext; |
|
} else { |
|
# no interesting values, don't set a default |
} |
} |
# end of not-a-package not-a-library import |
# end of not-a-package not-a-library import |
} |
} |
Line 7726 sub hreflocation {
|
Line 7735 sub hreflocation {
|
$file=~s-^/home/httpd/lonUsers/($match_domain)/./././($match_name)/userfiles/ |
$file=~s-^/home/httpd/lonUsers/($match_domain)/./././($match_name)/userfiles/ |
-/uploaded/$1/$2/-x; |
-/uploaded/$1/$2/-x; |
} |
} |
|
if ($file=~ m{^/userfiles/}) { |
|
$file =~ s{^/userfiles/}{/uploaded/}; |
|
} |
return $file; |
return $file; |
} |
} |
|
|