[LON-CAPA-cvs] cvs: loncom(version_2_3_X) /interface lonpickcourse.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 11 Dec 2006 22:22:10 -0000


albertel		Mon Dec 11 17:22:10 2006 EDT

  Modified files:              (Branch: version_2_3_X)
    /loncom/interface	lonpickcourse.pm 
  Log:
  - backport 1.61
  
  
Index: loncom/interface/lonpickcourse.pm
diff -u loncom/interface/lonpickcourse.pm:1.60.2.1 loncom/interface/lonpickcourse.pm:1.60.2.2
--- loncom/interface/lonpickcourse.pm:1.60.2.1	Mon Dec 11 16:41:40 2006
+++ loncom/interface/lonpickcourse.pm	Mon Dec 11 17:22:06 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Pick a course
 #
-# $Id: lonpickcourse.pm,v 1.60.2.1 2006/12/11 21:41:40 albertel Exp $
+# $Id: lonpickcourse.pm,v 1.60.2.2 2006/12/11 22:22:06 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -35,7 +35,6 @@
 use Apache::lonnet;
 use Apache::lonlocal;
 use Apache::longroup;
-use lib '/home/httpd/lib/perl/';
 use LONCAPA;
 
 sub handler {
@@ -266,7 +265,15 @@
     foreach my $item (@{$filterlist}) {
         $filter->{$item} = $env{'form.'.$item};
         if ($item ne 'descriptfilter' && $item ne 'instcodefilter') {
-            $filter->{$item} =~ s/\W//g;
+	    if ($item eq 'domainfilter' || $item eq 'ownerdomfilter') {
+		$filter->{$item} = &LONCAPA::clean_domain($filter->{$item});
+	    } elsif ($item eq 'coursefilter') {
+		$filter->{$item} = &LONCAPA::clean_courseid($filter->{$item});
+	    } elsif ($item eq 'ownerfilter') {
+		$filter->{$item} = &LONCAPA::clean_username($filter->{$item});
+	    } else {
+		$filter->{$item} =~ s/\W//g;
+	    }
             if (!$filter->{$item}) {
                 $filter->{$item} = '';
             }