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

Back to archive index

Minahito minah****@users*****
2006年 5月 26日 (金) 18:01:46 JST


Index: xoops2jp/html/modules/user/admin/actions/GroupPermAction.class.php
diff -u xoops2jp/html/modules/user/admin/actions/GroupPermAction.class.php:1.1.2.4 xoops2jp/html/modules/user/admin/actions/GroupPermAction.class.php:1.1.2.5
--- xoops2jp/html/modules/user/admin/actions/GroupPermAction.class.php:1.1.2.4	Tue Mar 28 22:31:14 2006
+++ xoops2jp/html/modules/user/admin/actions/GroupPermAction.class.php	Fri May 26 18:01:46 2006
@@ -57,34 +57,22 @@
 		$moduleHandler =& xoops_gethandler('module');
 		$modPerms = array();
 
+		//
+		// Store module read permission
+		//
 		foreach ($this->mActionForm->get('module') as $mid => $value)
 		{
 			$module =& $moduleHandler->get($mid);
-			if (is_object($module)) {
-				$item =& new User_PermissionModuleItem($module);
-				$modPerms[$mid] =& new User_Permission($this->mGroup->getVar('groupid'), $item);
-
-				if (isset($_POST['module_admin']) && isset($_POST['module_admin'][$mid])) {
-					$value |= $_POST['module_admin'][$mid];
-				}
-
-				$modPerms[$mid]->setValue($value);
-					
-				$modPerms[$mid]->save();
+			if (is_object($module) && $value) {
+				$gpermHandler->addRight('module_read', $mid, $this->mGroup->getVar('groupid'));
 			}
 		}
 
 		foreach ($this->mActionForm->get('module_admin') as $mid => $value)
 		{
 			$module =& $moduleHandler->get($mid);
-			if (is_object($module)) {
-				if (!isset($modPerms[$mid])) {
-					$item =& new User_PermissionModuleItem($module);
-					$modPerms[$mid] =& new User_Permission($this->mGroup->getVar('groupid'), $item);
-					$modPerms[$mid]->setValue($value);
-
-					$modPerms[$mid]->save();
-				}
+			if (is_object($module) && $value) {
+				$gpermHandler->addRight('module_admin', $mid, $this->mGroup->getVar('groupid'));
 			}
 		}
 
@@ -93,13 +81,8 @@
 		foreach ($this->mActionForm->get('block') as $bid => $value)
 		{
 			$block =& $blockHandler->get($bid);
-			if (is_object($block)) {
-				$item =& new User_PermissionBlockItem($block);
-				$perm =& new User_Permission($this->mGroup->getVar('groupid'), $item);
-				$perm->setValue($value);
-				$perm->save();
-					
-				unset($perm);
+			if (is_object($block) && $value) {
+				$gpermHandler->addRight('block_read', $bid, $this->mGroup->getVar('groupid'));
 			}
 		}
 		


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