[xoops-cvslog 2622] CVS update: xoops2jp/html/modules/base/admin/class

Back to archive index

NobuNobu nobun****@users*****
2006年 4月 2日 (日) 23:42:44 JST


Index: xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php
diff -u xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.9 xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.10
--- xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.9	Wed Mar 29 22:52:01 2006
+++ xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php	Sun Apr  2 23:42:44 2006
@@ -77,12 +77,16 @@
     			//
     			// Add a permission which administrators can read.
     			//
-    			$readPerm =& $this->_createPermission(XOOPS_GROUP_ADMIN);
-    			$readPerm->setVar('gperm_name', 'module_read');
-
-    			if (!$gpermHandler->insert($readPerm)) {
-    				$log->addError("Could not set read permission " . $this->mModule->getVar('mid'));
-    			}
+			    $root = $root=&XCube_Root::getSingleton();
+                $groups = $root->mController->mXoopsUser->getGroups();
+				foreach($groups as $mygroup) {
+        			$readPerm =& $this->_createPermission($mygroup);
+    			    $readPerm->setVar('gperm_name', 'module_read');
+
+       			    if (!$gpermHandler->insert($readPerm)) {
+    			    	$log->addError("Could not set read permission " . $this->mModule->getVar('mid'));
+    				}
+				}
     		}
 		}
 	}
Index: xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php
diff -u xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.12 xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.13
--- xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.12	Wed Mar 29 22:52:01 2006
+++ xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php	Sun Apr  2 23:42:44 2006
@@ -301,10 +301,15 @@
         				}
         			}
 				} else {
-    				$bperm->setVar('gperm_groupid', XOOPS_GROUP_ADMIN);
-    				if (!$gpermHandler->insert($bperm)) {
-    					$log->addWarn("Could not set block permission " . $blockObj->getVar('name'));
-				    }
+				    $root = $root=&XCube_Root::getSingleton();
+                    $groups = $root->mController->mXoopsUser->getGroups();var_dump($groups);
+                    foreach ($groups as $mygroup) {
+        				$bperm->setVar('gperm_groupid', $mygroup);
+        				$bperm->setNew();
+        				if (!$gpermHandler->insert($bperm)) {
+        					$log->addWarn("Could not set block permission " . $blockObj->getVar('name'));
+    				    }
+    				}
 				}
 			}
 


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