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

Back to archive index

Minahito minah****@users*****
2006年 7月 26日 (水) 19:51:37 JST


Index: xoops2jp/html/include/notification_functions.php
diff -u xoops2jp/html/include/notification_functions.php:1.2.8.2 xoops2jp/html/include/notification_functions.php:1.2.8.3
--- xoops2jp/html/include/notification_functions.php:1.2.8.2	Tue Jan 24 22:08:06 2006
+++ xoops2jp/html/include/notification_functions.php	Wed Jul 26 19:51:37 2006
@@ -1,5 +1,5 @@
 <?php
-// $Id: notification_functions.php,v 1.2.8.2 2006/01/24 13:08:06 minahito Exp $
+// $Id: notification_functions.php,v 1.2.8.3 2006/07/26 10:51:37 minahito Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -82,7 +82,7 @@
  * @param  int     $module_id  ID of the module (default current module)
  * @return mixed
  */
-function &notificationCategoryInfo ($category_name='', $module_id=null)
+function &notificationCategoryInfo ($category_name = null, $module_id = null)
 {
 	if (!isset($module_id)) {
 		global $xoopsModule;
@@ -93,7 +93,7 @@
 		$module =& $module_handler->get($module_id);
 	}
 	$not_config =& $module->getInfo('notification');
-	if (empty($category_name)) {
+	if ($category_name == null) {
 		return $not_config['category'];
 	}
 	foreach ($not_config['category'] as $category) {
@@ -188,8 +188,10 @@
 			}
 		}
 	}
+	
 
-	include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/notification.php';
+	$root =& XCube_Root::getSingleton();
+	$root->mLanguageManager->loadPageTypeMessageCatalog('notification');
 
 	// Insert comment info if applicable
 	
@@ -256,7 +258,6 @@
 		}	
 	}
 
-
 	return $event_array;
 	
 }
@@ -277,9 +278,9 @@
 {
 	$config_handler =& xoops_gethandler('config');
 	$mod_config = $config_handler->getConfigsByCat(0,$module->getVar('mid'));
-
+	
 	$option_name = notificationGenerateConfig ($category, $event, 'option_name');
-	if (is_array($option_name) && in_array($option_name, $mod_config['notification_events'])) {
+	if (is_array($mod_config['notification_events']) && in_array($option_name, $mod_config['notification_events'])) {
 		return true;
 	}
 	$notification_handler =& xoops_gethandler('notification');
@@ -328,7 +329,6 @@
 	$sub_categories = array();
 
 	foreach ($all_categories as $category) {
-
 		// Check the script name
 
 		$subscribe_from = $category['subscribe_from'];


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