[xoops-cvslog 4413] CVS update: xoops2jp/html/modules/user/actions

Back to archive index

Minahito minah****@users*****
2006年 9月 1日 (金) 12:14:29 JST


Index: xoops2jp/html/modules/user/actions/UserInfoAction.class.php
diff -u xoops2jp/html/modules/user/actions/UserInfoAction.class.php:1.1.2.6 xoops2jp/html/modules/user/actions/UserInfoAction.class.php:1.1.2.7
--- xoops2jp/html/modules/user/actions/UserInfoAction.class.php:1.1.2.6	Sat Aug 26 13:58:17 2006
+++ xoops2jp/html/modules/user/actions/UserInfoAction.class.php	Fri Sep  1 12:14:29 2006
@@ -1,11 +1,13 @@
 <?php
 /**
  * @package user
- * @version $Id: UserInfoAction.class.php,v 1.1.2.6 2006/08/26 04:58:17 minahito Exp $
+ * @version $Id: UserInfoAction.class.php,v 1.1.2.7 2006/09/01 03:14:29 minahito Exp $
  */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
 
+define ('USER_USERINFO_MAXHIT', 5);
+
 /**
  * This action shows a information of the target user which is specified by
  * $uid. And display posts of the user with the global search service.
@@ -50,14 +52,31 @@
 		
 		$root =& $controller->mRoot;
 		$service =& $root->mServiceManager->getService("LegacySearch");
-		if (is_object($service)) {
+		if ($service != null) {
+			$this->mSearchResults = array();
+			
 			$client =& $root->mServiceManager->createClient($service);
 			
-			$current_uid = is_object($xoopsUser) ? $xoopsUser->get('uid') : 0;
-
-			$this->mSearchResults = $client->call('GetItems', $uid, $current_uid);
+			$moduleArr = $client->call('getActiveModules', array());
+			
+			foreach ($moduleArr as $t_module) {
+				$module = array();
+				$module['name'] = $t_module['name'];
+				
+				$params['mid'] = $t_module['mid'];
+				$params['uid'] = $xoopsUser->get('uid');
+				$params['maxhit'] = USER_USERINFO_MAXHIT;
+				$params['start'] = 0;
+				
+				$module['results'] = $client->call('searchItemsOfUser', $params);
+				
+				if (count($module['results']) > 0) {
+					$module['has_more'] = (count($module['results']) >= USER_USERINFO_MAXHIT) ? true : false;
+					$this->mSearchResults[] = $module;
+				}
+			}
 		}
-		
+
 		return USER_FRAME_VIEW_SUCCESS;
 	}
 	


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