[xoops-cvslog 2363] CVS update: xoops2jp/html/class

アーカイブの一覧に戻る

NobuNobu nobun****@users*****
2006年 2月 28日 (火) 23:36:04 JST


Index: xoops2jp/html/class/token.php
diff -u xoops2jp/html/class/token.php:1.3.6.1 xoops2jp/html/class/token.php:1.3.6.2
--- xoops2jp/html/class/token.php:1.3.6.1	Wed Oct 19 02:16:18 2005
+++ xoops2jp/html/class/token.php	Tue Feb 28 23:36:04 2006
@@ -190,7 +190,7 @@
      */
     function &create($name,$timeout = XOOPS_TOKEN_TIMEOUT)
     {
-        $token = new XoopsToken($name,$timeout);
+        $token =& new XoopsToken($name,$timeout);
         $this->register($token);
         return $token;
     }
@@ -204,12 +204,11 @@
      */
     function &fetch($name)
     {
+        $ret = null;
         if(isset($_SESSION[XOOPS_TOKEN_SESSION_STRING][$this->_prefix.$name])) {
-            return $_SESSION[XOOPS_TOKEN_SESSION_STRING][$this->_prefix.$name];
-        }
-        else {
-            return null;
+            $ret =& $_SESSION[XOOPS_TOKEN_SESSION_STRING][$this->_prefix.$name];
         }
+        return $ret;
     }
 
     /**
@@ -285,7 +284,7 @@
     */
     function &quickCreate($name,$timeout = XOOPS_TOKEN_TIMEOUT)
     {
-        $handler = new XoopsSingleTokenHandler();
+        $handler =& new XoopsSingleTokenHandler();
         return $handler->create($name,$timeout);
     }
 
@@ -311,7 +310,7 @@
 {
     function &create($name,$timeout=XOOPS_TOKEN_TIMEOUT)
     {
-        $token = new XoopsToken($name,$timeout);
+        $token =& new XoopsToken($name,$timeout);
         $token->setSerialNumber($this->getUniqueSerial($name));
         $this->register($token);
         return $token;
@@ -319,12 +318,11 @@
 
     function &fetch($name,$serial_number)
     {
+        $ret = null;
         if(isset($_SESSION[XOOPS_TOKEN_MULTI_SESSION_STRING][$this->_prefix.$name][$serial_number])) {
-            return $_SESSION[XOOPS_TOKEN_MULTI_SESSION_STRING][$this->_prefix.$name][$serial_number];
-        }
-        else {
-            return null;
+            $ret =& $_SESSION[XOOPS_TOKEN_MULTI_SESSION_STRING][$this->_prefix.$name][$serial_number];
         }
+        return $ret;
     }
 
     function register(&$token)
@@ -362,7 +360,7 @@
     */
     function &quickCreate($name,$timeout = XOOPS_TOKEN_TIMEOUT)
     {
-        $handler = new XoopsMultiTokenHandler();
+        $handler =& new XoopsMultiTokenHandler();
         return $handler->create($name,$timeout);
     }
 
Index: xoops2jp/html/class/xoopsblock.php
diff -u xoops2jp/html/class/xoopsblock.php:1.2.8.5 xoops2jp/html/class/xoopsblock.php:1.2.8.6
--- xoops2jp/html/class/xoopsblock.php:1.2.8.5	Tue Jan  3 00:04:59 2006
+++ xoops2jp/html/class/xoopsblock.php	Tue Feb 28 23:36:04 2006
@@ -1,5 +1,5 @@
 <?php
-// $Id: xoopsblock.php,v 1.2.8.5 2006/01/02 15:04:59 minahito Exp $
+// $Id: xoopsblock.php,v 1.2.8.6 2006/02/28 14:36:04 nobunobu Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -354,7 +354,7 @@
                 if (!$asobject) {
                     $ret[] = $myrow['bid'];
                 } else {
-                    $ret[] = new XoopsBlock($myrow);
+                    $ret[] =& new XoopsBlock($myrow);
                 }
                 array_push($added, $myrow['bid']);
             }
@@ -388,16 +388,17 @@
             $sql = "SELECT * FROM ".$db->prefix("newblocks")."".$where_query;
             $result = $db->query($sql);
             while ( $myrow = $db->fetchArray($result) ) {
-                $ret[] = new XoopsBlock($myrow);
+                $ret[] =& new XoopsBlock($myrow);
             }
             break;
         case "list":
             $sql = "SELECT * FROM ".$db->prefix("newblocks")."".$where_query;
             $result = $db->query($sql);
             while ( $myrow = $db->fetchArray($result) ) {
-                $block = new XoopsBlock($myrow);
+                $block =& new XoopsBlock($myrow);
                 $name = ($block->getVar("block_type") != "C") ? $block->getVar("name") : $block->getVar("title");
                 $ret[$block->getVar("bid")] = $name;
+                unset($block);
             }
             break;
         case "id":
@@ -424,7 +425,7 @@
         $ret = array();
         while( $myrow = $db->fetchArray($result) ) {
             if ( $asobject ) {
-                $ret[] = new XoopsBlock($myrow);
+                $ret[] =& new XoopsBlock($myrow);
             } else {
                 $ret[] = $myrow['bid'];
             }
Index: xoops2jp/html/class/xoopslists.php
diff -u xoops2jp/html/class/xoopslists.php:1.2.8.1 xoops2jp/html/class/xoopslists.php:1.2.8.2
--- xoops2jp/html/class/xoopslists.php:1.2.8.1	Wed Oct 19 02:17:20 2005
+++ xoops2jp/html/class/xoopslists.php	Tue Feb 28 23:36:04 2006
@@ -1,5 +1,5 @@
 <?php
-// $Id: xoopslists.php,v 1.2.8.1 2005/10/18 17:17:20 minahito Exp $
+// $Id: xoopslists.php,v 1.2.8.2 2006/02/28 14:36:04 nobunobu Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -172,10 +172,10 @@
                 foreach ( $dirlist as $dir ) {
                     $avatars[$dir] =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/".$dir."/", $dir."/");
                 }
-            } else {
-                return false;
-            }
-            return $avatars;
+            	return $avatars;
+        	}
+            $ret = false;
+            return $ret;
         }
 
         /*


xoops-cvslog メーリングリストの案内
アーカイブの一覧に戻る