fix export_user cmd for now
authorDirk Koopman <djk@tobit.co.uk>
Fri, 15 May 2020 23:24:41 +0000 (00:24 +0100)
committerDirk Koopman <djk@tobit.co.uk>
Fri, 15 May 2020 23:24:41 +0000 (00:24 +0100)
cmd/export_users.pl
perl/DXUser.pm

index 11009572b13aa55ce9a278b13409054386055217..69cecc797f86bb0dd8a353e729d5dd7bc6c282e2 100644 (file)
@@ -15,7 +15,7 @@ unless ($fn && $fn eq 'user_json') {
 }
 my $strip = $flag eq 'strip';
 
-my @out = DXUser::export($fn, $strip);
+my @out = DXUser::export(undef, $strip); # for now
 
 return (1, @out);
 
index 17a78f707528dac6175514c97f4bb5dd70a138c5..de55f1b6e84d01ffa170d215fa91b759d02d0e50 100644 (file)
@@ -272,32 +272,9 @@ sub get
        my $call = uc shift;
        my $data;
        
-       # is it in the LRU cache?
        my $ref = $u{$call} if exists $u{$call};
-#      my $ref = $lru->get($call);
        return $ref if $ref && ref $ref eq 'DXUser';
        
-       # search for it
-       # unless ($dbm->get($call, $data)) {
-       #       eval { $ref = decode($data); };
-               
-       #       if ($ref) {
-       #               if (!UNIVERSAL::isa($ref, 'DXUser')) {
-       #                       dbg("DXUser::get: got strange answer from decode of $call". ref $ref. " ignoring");
-       #                       return undef;
-       #               }
-       #               # we have a reference and it *is* a DXUser
-       #       } else {
-       #               if ($@) {
-       #                       LogDbg('err', "DXUser::get decode error on $call '$@'");
-       #               } else {
-       #                       dbg("DXUser::get: no reference returned from decode of $call $!");
-       #               }
-       #               return undef;
-       #       }
-       #       $lru->put($call, $ref);
-       #       return $ref;
-       # }
        return undef;
 }
 
@@ -466,7 +443,7 @@ sub export
 {
        my $name = shift;
 
-       my $fn = $name || "$main::local_data/user_json"; # force use of local_data
+       my $fn = $name || localdata("user_json"); # force use of local_data
        
        # save old ones
        move "$fn.oooo", "$fn.ooooo" if -e "$fn.oooo";