[xoops-cvslog 5828] CVS update: xoops2jp/html/include

Back to archive index

Minahito minah****@users*****
2006年 11月 13日 (月) 19:41:33 JST


Index: xoops2jp/html/include/notification_functions.php
diff -u xoops2jp/html/include/notification_functions.php:1.2.8.3 xoops2jp/html/include/notification_functions.php:1.2.8.3.2.1
--- xoops2jp/html/include/notification_functions.php:1.2.8.3	Wed Jul 26 19:51:37 2006
+++ xoops2jp/html/include/notification_functions.php	Mon Nov 13 19:41:33 2006
@@ -1,5 +1,5 @@
 <?php
-// $Id: notification_functions.php,v 1.2.8.3 2006/07/26 10:51:37 minahito Exp $
+// $Id: notification_functions.php,v 1.2.8.3.2.1 2006/11/13 10:41:33 minahito Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -92,6 +92,12 @@
 		$module_handler =& xoops_gethandler('module');
 		$module =& $module_handler->get($module_id);
 	}
+	
+	if (!is_object($module)) {
+		$ret = false;
+		return $ret;
+	}
+	
 	$not_config =& $module->getInfo('notification');
 	if ($category_name == null) {
 		return $not_config['category'];
@@ -101,7 +107,9 @@
 			return $category;
 		}
 	}
-	return false;
+	
+	$ret = false;
+	return $ret;
 }
 
 /**
@@ -158,6 +166,12 @@
 		$module_handler =& xoops_gethandler('module');
 		$module =& $module_handler->get($module_id);
 	}
+	
+	if (!is_object($module)) {
+		$ret = false;
+		return $ret;
+	}
+	
 	$not_config =& $module->getInfo('notification');
 	$config_handler =& xoops_gethandler('config');
 	$mod_config = $config_handler->getConfigsByCat(0,$module_id);
@@ -301,12 +315,16 @@
 function &notificationEventInfo ($category_name, $event_name, $module_id=null)
 {
 	$all_events =& notificationEvents ($category_name, false, $module_id);
-	foreach ($all_events as $event) {
-		if ($event['name'] == $event_name) {
-			return $event;
+	if (is_array($all_events)) {
+		foreach ($all_events as $event) {
+			if ($event['name'] == $event_name) {
+				return $event;
+			}
 		}
 	}
-	return false;
+	
+	$ret = false;
+	return $ret;
 }
 
 


xoops-cvslog メーリングリストの案内
Back to archive index