[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
droeschl
droeschl at source.lon-capa.org
Tue Apr 24 16:31:59 EDT 2012
droeschl Tue Apr 24 20:31:59 2012 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
Removed unused $range parameter from dump_dom because it's going to be
eliminated in dump and lond's dump_with_regexp shortly.
Also, refactoring of dump_dom to avoid unnecessary copy of hash.
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1164 loncom/lonnet/perl/lonnet.pm:1.1165
--- loncom/lonnet/perl/lonnet.pm:1.1164 Sat Apr 14 00:52:16 2012
+++ loncom/lonnet/perl/lonnet.pm Tue Apr 24 20:31:59 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1164 2012/04/14 00:52:16 raeburn Exp $
+# $Id: lonnet.pm,v 1.1165 2012/04/24 20:31:59 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1535,16 +1535,13 @@
# ------------------------------dump from db file owned by domainconfig user
sub dump_dom {
- my ($namespace,$udom,$regexp,$range)=@_;
- if (!$udom) {
- $udom=$env{'user.domain'};
- }
- my %returnhash;
- if ($udom) {
- my $uname = &get_domainconfiguser($udom);
- %returnhash = &dump($namespace,$udom,$uname,$regexp,$range);
- }
- return %returnhash;
+ my ($namespace, $udom, $regexp) = @_;
+
+ $udom ||= $env{'user.domain'};
+
+ return () unless $udom;
+
+ return &dump($namespace, $udom, &get_domainconfiguser($udom), $regexp);
}
# ------------------------------------------ get items from domain db files
More information about the LON-CAPA-cvs
mailing list