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

Back to archive index

Minahito minah****@users*****
2006年 8月 5日 (土) 15:16:55 JST


Index: xoops2jp/html/kernel/groupperm.php
diff -u xoops2jp/html/kernel/groupperm.php:1.2.8.2 xoops2jp/html/kernel/groupperm.php:1.2.8.3
--- xoops2jp/html/kernel/groupperm.php:1.2.8.2	Tue May 16 22:25:07 2006
+++ xoops2jp/html/kernel/groupperm.php	Sat Aug  5 15:16:55 2006
@@ -1,5 +1,5 @@
 <?php
-// $Id: groupperm.php,v 1.2.8.2 2006/05/16 13:25:07 nobunobu Exp $
+// $Id: groupperm.php,v 1.2.8.3 2006/08/05 06:16:55 minahito Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -365,6 +365,27 @@
         $perm->setVar('gperm_modid', $gperm_modid);
         return $this->insert($perm);
     }
+	
+    /**
+     * Remove a permission
+     * 
+     * @param	string  $gperm_name       Name of permission
+     * @param	int     $gperm_itemid     ID of an item
+     * @param	int     $gperm_groupid    ID of a group
+     * @param	int     $gperm_modid      ID of a module
+     *
+     * @return	bool    TRUE jf success
+     */
+    function removeRight($gperm_name, $gperm_itemid, $gperm_groupid, $gperm_modid = 1)
+    {
+		$criteria =& new CriteriaCompo();
+		$criteria->add(new Criteria('gperm_name', $gperm_name));
+		$criteria->add(new Criteria('gperm_itemid', $gperm_itemid));
+		$criteria->add(new Criteria('gperm_groupid', $gperm_groupid));
+		$criteria->add(new Criteria('gperm_modid', $gperm_modid));
+		
+		return $this->deleteAll($criteria);
+    }
 
     /**
      * Get all item IDs that a group is assigned a specific permission


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