[xoops-cvslog 2857] CVS update: xoops2jp/html/kernel

Back to archive index

NobuNobu nobun****@users*****
2006年 4月 23日 (日) 00:53:00 JST


Index: xoops2jp/html/kernel/config.php
diff -u xoops2jp/html/kernel/config.php:1.2.8.1 xoops2jp/html/kernel/config.php:1.2.8.2
--- xoops2jp/html/kernel/config.php:1.2.8.1	Mon Jan  2 21:40:26 2006
+++ xoops2jp/html/kernel/config.php	Sun Apr 23 00:53:00 2006
@@ -1,5 +1,5 @@
 <?php
-// $Id: config.php,v 1.2.8.1 2006/01/02 12:40:26 minahito Exp $
+// $Id: config.php,v 1.2.8.2 2006/04/22 15:53:00 nobunobu Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -91,8 +91,8 @@
      */
     function XoopsConfigHandler(&$db)
     {
-        $this->_cHandler = new XoopsConfigItemHandler($db);
-        $this->_oHandler = new XoopsConfigOptionHandler($db);
+        $this->_cHandler =& new XoopsConfigItemHandler($db);
+        $this->_oHandler =& new XoopsConfigOptionHandler($db);
     }
 
     /**
@@ -103,7 +103,8 @@
      */
     function &createConfig()
     {
-        return $this->_cHandler->create();
+        $ret =& $this->_cHandler->create();
+        return $ret;
     }
 
     /**
@@ -235,7 +236,8 @@
      * @return	object  {@link XoopsConfigOption} 
      */
     function &createConfigOption(){
-        return $this->_oHandler->create();
+        $ret =& $this->_oHandler->create();
+        return $ret;
     }
 
     /**
@@ -247,7 +249,8 @@
      */
     function &getConfigOption($id)
     {
-        return $this->_oHandler->get($id);
+        $ret =& $this->_oHandler->get($id);
+        return $ret;
     }
 
     /**
@@ -260,7 +263,8 @@
      */
     function &getConfigOptions($criteria = null, $id_as_key = false)
     {
-        return $this->_oHandler->getObjects($criteria, $id_as_key);
+        $ret =& $this->_oHandler->getObjects($criteria, $id_as_key);
+        return $ret;
     }
 
     /**
Index: xoops2jp/html/kernel/member.php
diff -u xoops2jp/html/kernel/member.php:1.2.8.6 xoops2jp/html/kernel/member.php:1.2.8.7
--- xoops2jp/html/kernel/member.php:1.2.8.6	Tue Jan 17 19:28:15 2006
+++ xoops2jp/html/kernel/member.php	Sun Apr 23 00:53:00 2006
@@ -1,5 +1,5 @@
 <?php
-// $Id: member.php,v 1.2.8.6 2006/01/17 10:28:15 minahito Exp $
+// $Id: member.php,v 1.2.8.7 2006/04/22 15:53:00 nobunobu Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -76,9 +76,9 @@
      */
     function XoopsMemberHandler(&$db)
     {
-        $this->_gHandler = new XoopsGroupHandler($db);
-        $this->_uHandler = new XoopsUserHandler($db);
-        $this->_mHandler = new XoopsMembershipHandler($db);
+        $this->_gHandler =& new XoopsGroupHandler($db);
+        $this->_uHandler =& new XoopsUserHandler($db);
+        $this->_mHandler =& new XoopsMembershipHandler($db);
     }
 
     /**
@@ -88,7 +88,8 @@
      */
     function &createGroup()
     {
-        return $this->_gHandler->create();
+        $ret =& $this->_gHandler->create();
+        return $ret;
     }
 
     /**
@@ -98,7 +99,8 @@
      */
     function &createUser()
     {
-        return $this->_uHandler->create();
+        $ret =& $this->_uHandler->create();
+        return $ret;
     }
 
     /**
@@ -107,9 +109,10 @@
      * @param int $id ID for the group
      * @return object XoopsGroup reference to the group
      */
-    function getGroup($id)
+    function &getGroup($id)
     {
-        return $this->_gHandler->get($id);
+        $ret =& $this->_gHandler->get($id);
+        return $ret;
     }
 
     /**
@@ -214,9 +217,10 @@
      * @param bool $id_as_key use the group's ID as key for the array?
      * @return array array of {@link XoopsGroup} objects
      */
-    function getGroups($criteria = null, $id_as_key = false)
+    function &getGroups($criteria = null, $id_as_key = false)
     {
-        return $this->_gHandler->getObjects($criteria, $id_as_key);
+        $groups =& $this->_gHandler->getObjects($criteria, $id_as_key);
+        return $groups;
     }
 
     /**
@@ -226,9 +230,10 @@
      * @param bool $id_as_key use the group's ID as key for the array?
      * @return array array of {@link XoopsUser} objects
      */
-    function getUsers($criteria = null, $id_as_key = false)
+    function &getUsers($criteria = null, $id_as_key = false)
     {
-        return $this->_uHandler->getObjects($criteria, $id_as_key);
+        $users =& $this->_uHandler->getObjects($criteria, $id_as_key);
+        return $users;
     }
 
     /**
@@ -272,7 +277,7 @@
      */
     function addUserToGroup($group_id, $user_id)
     {
-        $group_ids = $this->getGroupsByUser($user_id);
+        $group_ids =& $this->getGroupsByUser($user_id);
         if (!in_array($group_id, $group_ids)) {
             $mship =& $this->_mHandler->create();
             $mship->setVar('groupid', $group_id);
@@ -371,12 +376,13 @@
      * @param bool $asobject return groups as {@link XoopsGroup} objects or arrays?
      * @return array array of objects or arrays
      */
-    function getGroupsByUser($user_id, $asobject = false)
+    function &getGroupsByUser($user_id, $asobject = false)
     {
         $group_ids =& $this->_mHandler->getGroupsByUser($user_id);
         if (!$asobject) {
            return $group_ids;
         } else {
+		   $ret = array();
            foreach ($group_ids as $g_id) {
                $ret[] =& $this->getGroup($g_id);
            }
@@ -397,7 +403,8 @@
         $criteria->add(new Criteria('pass', md5($pwd)));
         $user =& $this->_uHandler->getObjects($criteria, false);
         if (!$user || count($user) != 1) {
-            return false;
+			$ret = false;
+            return $ret;
         }
         return $user[0];
     }
@@ -415,7 +422,8 @@
         $criteria->add(new Criteria('pass', $md5pwd));
         $user =& $this->_uHandler->getObjects($criteria, false);
         if (!$user || count($user) != 1) {
-            return false;
+            $ret = false;
+            return $ret;
         }
         return $user[0];
     }


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