[LON-CAPA-cvs] cvs: loncom / lond
raeburn
raeburn@source.lon-capa.org
Sat, 17 Jul 2010 19:14:35 -0000
raeburn Sat Jul 17 19:14:35 2010 EDT
Modified files:
/loncom lond
Log:
- Correction to regexp used in detection of Community roles in dump of roles.db.
- Correction to regexp used to extract version information from Version string.
- Community roles available on homeserver of Community, regardless of version.
Index: loncom/lond
diff -u loncom/lond:1.445 loncom/lond:1.446
--- loncom/lond:1.445 Fri Jun 25 04:37:44 2010
+++ loncom/lond Sat Jul 17 19:14:35 2010
@@ -2,7 +2,7 @@
# The LearningOnline Network
# lond "LON Daemon" Server (port "LOND" 5663)
#
-# $Id: lond,v 1.445 2010/06/25 04:37:44 raeburn Exp $
+# $Id: lond,v 1.446 2010/07/17 19:14:35 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -58,7 +58,7 @@
my $status='';
my $lastlog='';
-my $VERSION='$Revision: 1.445 $'; #' stupid emacs
+my $VERSION='$Revision: 1.446 $'; #' stupid emacs
my $remoteVERSION;
my $currenthostid="default";
my $currentdomainid;
@@ -3127,11 +3127,16 @@
my $count=0;
while (my ($key,$value) = each(%$hashref)) {
if ($namespace eq 'roles') {
- if ($key =~ /^($LONCAPA::match_domain)_($LONCAPA::match_community)_(cc|co|in|ta|ep|ad|st|cr)/) {
- if ($clientversion =~ /^(\d+)\.(\d+)$/) {
+ if ($key =~ m{^/($LONCAPA::match_domain)/($LONCAPA::match_community)_(cc|co|in|ta|ep|ad|st|cr)}) {
+ my $cdom = $1;
+ my $cnum = $2;
+ if ($clientversion =~ /^['"]?(\d+)\.(\d+)[.\d\-]+['"]?$/) {
my $major = $1;
my $minor = $2;
next if (($major < 2) || (($major == 2) && ($minor < 9)));
+ } else {
+ my $homeserver = &Apache::lonnet::homeserver($cnum,$cdom);
+ next unless ($currenthostid eq $homeserver);
}
}
}