Index: date_ical.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/date/Attic/date_ical.inc,v
retrieving revision 1.1.2.8
diff -u -p -r1.1.2.8 date_ical.inc
--- date_ical.inc	13 Mar 2007 15:19:42 -0000	1.1.2.8
+++ date_ical.inc	14 Jun 2007 20:16:37 -0000
@@ -103,11 +103,21 @@ function date_ical_escape_text($text) {
  *      'vcal'           => the complete vevent item,
  */
 function date_ical_import($filename) {
+  if (!ini_get('allow_url_fopen')) {
+    drupal_set_message('fopen not configured to fetch network data on this system (allow_url_fopen=FALSE)', 'error');
+    return array();
+  }
   $items = array();
   $ifile = @fopen($filename, "r");
-  if ($ifile == FALSE) exit('Invalid input file');
+  if ($ifile == FALSE) {
+    drupal_set_message('Failed to open URL: ' . $filename, 'error');
+    return array();
+  }
   $nextline = fgets($ifile, 1024);
-  if (trim($nextline) != 'BEGIN:VCALENDAR') exit('Invalid calendar file:' . $filename);
+  if (trim($nextline) != 'BEGIN:VCALENDAR') {
+    drupal_set_message('Invalid calendar file URL:' . $filename, 'error');
+    return array();
+  }
   while (!feof($ifile)) {
   	$line = $nextline;
     $nextline = fgets($ifile, 1024);
@@ -376,4 +386,4 @@ function _date_ical_calcOffset($offset_s
   $secs = ((int)$hours * 3600) + ((int)$mins * 60);
   if ($sign == '-') $secs = 0 - $secs;
   return $secs;
-}
\ No newline at end of file
+}
