[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonsearchcat.pm

raeburn raeburn at source.lon-capa.org
Sun Feb 23 17:16:20 EST 2014


raeburn		Sun Feb 23 22:16:20 2014 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonsearchcat.pm 
  Log:
  - For 2.11
    - Backport 1.341, 1.342.
  
  
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.331.4.9 loncom/interface/lonsearchcat.pm:1.331.4.10
--- loncom/interface/lonsearchcat.pm:1.331.4.9	Tue Dec 31 01:10:17 2013
+++ loncom/interface/lonsearchcat.pm	Sun Feb 23 22:16:20 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Search Catalog
 #
-# $Id: lonsearchcat.pm,v 1.331.4.9 2013/12/31 01:10:17 raeburn Exp $
+# $Id: lonsearchcat.pm,v 1.331.4.10 2014/02/23 22:16:20 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -170,7 +170,7 @@
     &Apache::lonhtmlcommon::clear_breadcrumbs();
 
     my @allowed_searches = ('portfolio');
-    if (&Apache::lonnet::allowed('bre',$env{'request.role.domain'})) {
+    if (&Apache::lonnet::allowed('bre',$env{'request.role.domain'}) eq 'F') {
         push(@allowed_searches,'res');
     } 
     my $crumb_text = 'Portfolio Search';
@@ -193,12 +193,15 @@
                 &Apache::lonnet::logthis('lonsearchcat:'.
                                          'Unable to recover data from '.
                                          $persistent_db_file);
-		my $msg =
-		    'We were unable to retrieve data describing your search. '.
-		    'This is a serious error and has been logged. '.
-		    'Please alert your LON-CAPA administrator.';
-		&Apache::loncommon::simple_error_page($r,'Search Error',
-						      $msg);
+                my $msg =
+                    &mt('We were unable to retrieve data describing your search.').
+                    ' '.&mt('This is a serious error and has been logged.').
+                    '<br />'.
+                    &mt('Please alert your LON-CAPA administrator.');
+                &Apache::loncommon::simple_error_page(
+                    $r,'Search Error',
+                    $msg,
+                    {'no_auto_mt_msg' => 1});
 		return OK;
             }
         }
@@ -446,7 +449,7 @@
 					    $env{'form.catalogmode'} ne 'import');
     my $scrout = &Apache::loncommon::start_page('Content Library').$bread_crumb;
 # Search form for resource space 
-    if (&Apache::lonnet::allowed('bre',$env{'request.role.domain'})) {
+    if (&Apache::lonnet::allowed('bre',$env{'request.role.domain'}) eq 'F') {
         $scrout .= &setup_basic_search($r,'res',$hidden_fields,$closebutton);
         $scrout .= '<hr /><br />';
     }




More information about the LON-CAPA-cvs mailing list