[LON-CAPA-cvs] cvs: loncom(version_2_1_X) / lonsql

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 10 Feb 2006 09:50:51 -0000


albertel		Fri Feb 10 04:50:51 2006 EDT

  Modified files:              (Branch: version_2_1_X)
    /loncom	lonsql 
  Log:
  - backport 1.75
  
  
Index: loncom/lonsql
diff -u loncom/lonsql:1.71 loncom/lonsql:1.71.2.1
--- loncom/lonsql:1.71	Tue Feb  7 11:20:39 2006
+++ loncom/lonsql	Fri Feb 10 04:50:50 2006
@@ -3,7 +3,7 @@
 # The LearningOnline Network
 # lonsql - LON TCP-MySQL-Server Daemon for handling database requests.
 #
-# $Id: lonsql,v 1.71 2006/02/07 16:20:39 albertel Exp $
+# $Id: lonsql,v 1.71.2.1 2006/02/10 09:50:50 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -440,7 +440,13 @@
                     $locresult = &localenroll::fetch_enrollment($dom,\%affiliates,\%replies);
                 } elsif ($query eq 'institutionalphotos') {
                     my $crs = &unescape($arg2);
-                    $locresult = &localenroll::institutional_photos($dom,$crs,\%affiliates,\%replies,'update');
+		    eval {
+			local($SIG{__DIE__})='DEFAULT';
+			$locresult = &localenroll::institutional_photos($dom,$crs,\%affiliates,\%replies,'update');
+		    };
+		    if ($@) {
+			$locresult = 'error';
+		    }
                 }
                 $result = &escape($locresult.':');
                 if ($locresult) {