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

Back to archive index

Minahito minah****@users*****
2006年 1月 2日 (月) 21:40:00 JST


Index: xoops2jp/html/include/functions.php
diff -u xoops2jp/html/include/functions.php:1.2.8.4 xoops2jp/html/include/functions.php:1.2.8.5
--- xoops2jp/html/include/functions.php:1.2.8.4	Fri Dec 30 17:21:05 2005
+++ xoops2jp/html/include/functions.php	Mon Jan  2 21:40:00 2006
@@ -1,5 +1,5 @@
 <?php
-// $Id: functions.php,v 1.2.8.4 2005/12/30 08:21:05 minahito Exp $
+// $Id: functions.php,v 1.2.8.5 2006/01/02 12:40:00 minahito Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -461,14 +461,17 @@
 function &getMailer()
 {
     global $xoopsConfig;
-    include_once XOOPS_ROOT_PATH."/class/xoopsmailer.php";
+	$ret = null;
+    require_once XOOPS_ROOT_PATH."/class/xoopsmailer.php";
     if ( file_exists(XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/xoopsmailerlocal.php") ) {
-        include_once XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/xoopsmailerlocal.php";
+        require_once XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/xoopsmailerlocal.php";
         if ( class_exists("XoopsMailerLocal") ) {
-            return new XoopsMailerLocal();
+            $ret =& new XoopsMailerLocal();
+			return $ret;
         }
     }
-    return new XoopsMailer();
+    $ret =& new XoopsMailer();
+	return $ret;
 }
 
 function &xoops_gethandler($name, $optional = false )
@@ -487,7 +490,13 @@
     if (!isset($handlers[$name]) && !$optional ) {
         trigger_error('Class <b>'.$class.'</b> does not exist<br />Handler Name: '.$name, E_USER_ERROR);
     }
-    return isset($handlers[$name]) ? $handlers[$name] : false;
+	
+	$falseRet = false;
+	
+    if (isset($handlers[$name]))
+        return $handlers[$name];
+	else
+        return $falseRet;
 }
 
 function &xoops_getmodulehandler($name = null, $module_dir = null, $optional = false)


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