[pLog-svn] r4195 - plog/trunk/class/dao

oscar at devel.lifetype.net oscar at devel.lifetype.net
Fri Oct 27 11:17:01 GMT 2006


Author: oscar
Date: 2006-10-27 11:16:58 +0000 (Fri, 27 Oct 2006)
New Revision: 4195

Modified:
   plog/trunk/class/dao/permissions.class.php
Log:
added Permissions::updatePermission()


Modified: plog/trunk/class/dao/permissions.class.php
===================================================================
--- plog/trunk/class/dao/permissions.class.php	2006-10-27 10:06:02 UTC (rev 4194)
+++ plog/trunk/class/dao/permissions.class.php	2006-10-27 11:16:58 UTC (rev 4195)
@@ -34,6 +34,22 @@
 		}
 		
 		/**
+		 * Update a permission
+		 *
+		 * @param perm
+		 * @return True if successful or false otherwise
+		 */
+		function updatePermission( &$perm )
+		{
+			if( ($result = $this->update( $perm ))) {
+				$this->_cache->removeData( $id, CACHE_PERMISSIONS );
+				$this->_cache->removeData( "_all_", CACHE_PERMISSIONS_ALL );				
+			}
+			
+			return( $result );
+		}
+		
+		/**
 		 * Retrieve a permission given its id
 		 *
 		 * @param id The id of the permission



More information about the pLog-svn mailing list