Diff for /loncom/interface/loncreateuser.pm between versions 1.177 and 1.178

version 1.177, 2007/08/25 19:52:29 version 1.178, 2007/08/26 15:31:03
Line 2419  sub directorysrch_check { Line 2419  sub directorysrch_check {
                        lastfirst => 'last name, first name',                         lastfirst => 'last name, first name',
                        lastname  => 'last name',                         lastname  => 'last name',
                        contains  => 'contains',                         contains  => 'contains',
                        exact     => 'as exact match to'                         exact     => 'as exact match to',
                          begins    => 'begins with',
                    );                     );
     if ($can_search) {      if ($can_search) {
         if (ref($dom_inst_srch{'directorysrch'}{'searchby'}) eq 'ARRAY') {          if (ref($dom_inst_srch{'directorysrch'}{'searchby'}) eq 'ARRAY') {
Line 2431  sub directorysrch_check { Line 2432  sub directorysrch_check {
         }          }
     }      }
     if ($can_search) {      if ($can_search) {
         if (($dom_inst_srch{'directorysrch'}{'searchtypes'} eq 'specify') ||          if (ref($dom_inst_srch{'directorysrch'}{'searchtypes'}) eq 'ARRAY') {
             ($dom_inst_srch{'directorysrch'}{'searchtypes'} eq $srch->{'srchtype'})) {              if (grep(/^\Q$srch->{'srchtype'}\E/,@{$dom_inst_srch{'directorysrch'}{'searchtypes'}})) {
             return 'ok';                  return 'ok';
         } else {                  } else {
             return &mt('Directory search in domain [_1] is not available for the requested search type: "[_2]"',$srch->{'srchdomain'},$longtext{$srch->{'srchtype'}});                  return &mt('Directory search in domain [_1] is not available for the requested search type: "[_2]"',$srch->{'srchdomain'},$longtext{$srch->{'srchtype'}});
               }
           } else {
               if ((($dom_inst_srch{'directorysrch'}{'searchtypes'} eq 'specify') &&
                    ($srch->{'srchtype'} eq 'exact' || $srch->{'srchtype'} eq 'contains')) ||
                   ($dom_inst_srch{'directorysrch'}{'searchtypes'} eq $srch->{'srchtype'})) {
                   return 'ok';
               } else {
                   return &mt('Directory search in domain [_1] is not available for the requested search type: "[_2]"',$srch->{'srchdomain'},$longtext{$srch->{'srchtype'}});
               }
         }          }
     }      }
 }  }

Removed from v.1.177  
changed lines
  Added in v.1.178


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>