version 1.300, 2005/10/14 19:08:31
|
version 1.306, 2006/01/21 08:26:52
|
Line 1422 sub ls_handler {
|
Line 1422 sub ls_handler {
|
open(FILE, $ulsdir.'/'.$ulsfn.".meta"); |
open(FILE, $ulsdir.'/'.$ulsfn.".meta"); |
my @obsolete=<FILE>; |
my @obsolete=<FILE>; |
foreach my $obsolete (@obsolete) { |
foreach my $obsolete (@obsolete) { |
if($obsolete =~ m|(<obsolete>)(on)|) { $obs = 1; } |
if($obsolete =~ m/(<obsolete>)(on|1)/) { $obs = 1; } |
if($obsolete =~ m|(<copyright>)(default)|) { $rights = 1; } |
if($obsolete =~ m|(<copyright>)(default)|) { $rights = 1; } |
} |
} |
} |
} |
Line 1490 sub ls2_handler {
|
Line 1490 sub ls2_handler {
|
open(FILE, $ulsdir.'/'.$ulsfn.".meta"); |
open(FILE, $ulsdir.'/'.$ulsfn.".meta"); |
my @obsolete=<FILE>; |
my @obsolete=<FILE>; |
foreach my $obsolete (@obsolete) { |
foreach my $obsolete (@obsolete) { |
if($obsolete =~ m|(<obsolete>)(on)|) { $obs = 1; } |
if($obsolete =~ m/(<obsolete>)(on|1)/) { $obs = 1; } |
if($obsolete =~ m|(<copyright>)(default)|) { |
if($obsolete =~ m|(<copyright>)(default)|) { |
$rights = 1; |
$rights = 1; |
} |
} |
Line 1978 sub update_resource_handler {
|
Line 1978 sub update_resource_handler {
|
new Cache::Memcached({'servers'=>['127.0.0.1:11211']}); |
new Cache::Memcached({'servers'=>['127.0.0.1:11211']}); |
my $url=$fname; |
my $url=$fname; |
$url=~s-^/home/httpd/html--; |
$url=~s-^/home/httpd/html--; |
|
$url=~s-\.meta$--; |
my $id=&escape('meta:'.$url); |
my $id=&escape('meta:'.$url); |
$memcache->delete($id); |
$memcache->delete($id); |
} |
} |
Line 2894 sub dump_with_regexp {
|
Line 2895 sub dump_with_regexp {
|
|
|
my $userinput = "$cmd:$tail"; |
my $userinput = "$cmd:$tail"; |
|
|
my ($udom,$uname,$namespace,$regexp)=split(/:/,$tail); |
my ($udom,$uname,$namespace,$regexp,$range)=split(/:/,$tail); |
if (defined($regexp)) { |
if (defined($regexp)) { |
$regexp=&unescape($regexp); |
$regexp=&unescape($regexp); |
} else { |
} else { |
$regexp='.'; |
$regexp='.'; |
} |
} |
|
my ($start,$end); |
|
if (defined($range)) { |
|
if ($range =~/^(\d+)\-(\d+)$/) { |
|
($start,$end) = ($1,$2); |
|
} elsif ($range =~/^(\d+)$/) { |
|
($start,$end) = (0,$1); |
|
} else { |
|
undef($range); |
|
} |
|
} |
my $hashref = &tie_user_hash($udom, $uname, $namespace, |
my $hashref = &tie_user_hash($udom, $uname, $namespace, |
&GDBM_READER()); |
&GDBM_READER()); |
if ($hashref) { |
if ($hashref) { |
my $qresult=''; |
my $qresult=''; |
|
my $count=0; |
while (my ($key,$value) = each(%$hashref)) { |
while (my ($key,$value) = each(%$hashref)) { |
if ($regexp eq '.') { |
if ($regexp eq '.') { |
|
$count++; |
|
if (defined($range) && $count >= $end) { last; } |
|
if (defined($range) && $count < $start) { next; } |
$qresult.=$key.'='.$value.'&'; |
$qresult.=$key.'='.$value.'&'; |
} else { |
} else { |
my $unescapeKey = &unescape($key); |
my $unescapeKey = &unescape($key); |
if (eval('$unescapeKey=~/$regexp/')) { |
if (eval('$unescapeKey=~/$regexp/')) { |
|
$count++; |
|
if (defined($range) && $count >= $end) { last; } |
|
if (defined($range) && $count < $start) { next; } |
$qresult.="$key=$value&"; |
$qresult.="$key=$value&"; |
} |
} |
} |
} |
Line 3594 sub dump_dcmail_handler {
|
Line 3612 sub dump_dcmail_handler {
|
if ($hashref) { |
if ($hashref) { |
while (my ($key,$value) = each(%$hashref)) { |
while (my ($key,$value) = each(%$hashref)) { |
my $match = 1; |
my $match = 1; |
my ($timestamp,$subj,$uname,$udom) = split(/:/,&unescape($key),5); |
my ($timestamp,$subj,$uname,$udom) = |
$timestamp = &unescape($timestamp); |
split(/:/,&unescape(&unescape($key)),5); # yes, twice really |
$subj = &unescape($subj); |
$subj = &unescape($subj); |
$uname = &unescape($uname); |
|
$udom = &unescape($udom); |
|
unless ($startfilter eq '.' || !defined($startfilter)) { |
unless ($startfilter eq '.' || !defined($startfilter)) { |
if ($timestamp < $startfilter) { |
if ($timestamp < $startfilter) { |
$match = 0; |
$match = 0; |