[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface lonpreferences.pm
raeburn
raeburn@source.lon-capa.org
Sun, 19 Sep 2010 14:00:50 -0000
raeburn Sun Sep 19 14:00:50 2010 EDT
Modified files: (Branch: GCI_3)
/loncom/interface lonpreferences.pm
Log:
- Customization for GCI_3.
-Backport 1.182.
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.179.2.2 loncom/interface/lonpreferences.pm:1.179.2.3
--- loncom/interface/lonpreferences.pm:1.179.2.2 Tue Jan 5 22:54:46 2010
+++ loncom/interface/lonpreferences.pm Sun Sep 19 14:00:49 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.179.2.2 2010/01/05 22:54:46 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.179.2.3 2010/09/19 14:00:49 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -995,14 +995,19 @@
my $domain = $env{'user.domain'};
my $newscreen = '';
my $message='';
- foreach (split(/\,/,$env{'form.msgforward'})) {
- my ($msuser,$msdomain)=split(/[\@\:]/,$_);
+ foreach my $recip (split(/\,/,$env{'form.msgforward'})) {
+ my ($msuser,$msdomain);
+ if ($recip =~ /:/) {
+ ($msuser,$msdomain)=split(':',$recip);
+ } else {
+ ($msuser,$msdomain)=split(/\@/,$recip);
+ }
$msuser = &LONCAPA::clean_username($msuser);
$msdomain = &LONCAPA::clean_domain($msdomain);
if (($msuser) && ($msdomain)) {
- if (&Apache::lonnet::homeserver($msuser,$msdomain) ne 'no_host') {
+ if (&Apache::lonnet::homeserver($msuser,$msdomain) ne 'no_host') {
$newscreen.=$msuser.':'.$msdomain.',';
- } else {
+ } else {
$message.= &mt('No such user: ').'<tt>'.$msuser.':'.$msdomain.'</tt><br />';
}
}