[Fusionforge-commits] r10564 - trunk/src/common/include

Roland Mas lolando at libremir.placard.fr.eu.org
Mon Sep 20 22:38:25 CEST 2010


Author: lolando
Date: 2010-09-20 22:38:24 +0200 (Mon, 20 Sep 2010)
New Revision: 10564

Modified:
   trunk/src/common/include/Role.class.php
Log:
More fixes in role creation

Modified: trunk/src/common/include/Role.class.php
===================================================================
--- trunk/src/common/include/Role.class.php	2010-09-20 20:31:23 UTC (rev 10563)
+++ trunk/src/common/include/Role.class.php	2010-09-20 20:38:24 UTC (rev 10564)
@@ -222,8 +222,10 @@
 				db_rollback();
 				return false;
 			}
+			$this->data_array['role_id'] = $role_id ;
+			$this->data_array['role_name'] = $role_name ;
 
-			$this->update ($data) ;
+			$this->update ($role_name, $data) ;
 			
 			$this->normalizeData () ;
 		} else {
@@ -287,17 +289,13 @@
 	}
 
 	function createDefault($name) {
-//echo '<html><body><pre>';
-//echo $name;
-//print_r($this->defaults);
-		$arr =& $this->defaults[$name];
+		if (array_key_exists ($name, $this->defaults)) {
+			$arr =& $this->defaults[$name];
+		} else {
+			$arr = array () ;
+		}
 		$keys = array_keys($arr);
 		$data = array();
-
-//print_r($keys);
-//print_r($arr);
-//db_rollback();
-//exit;
 		for ($i=0; $i<count($keys); $i++) {
 
 			if ($keys[$i] == 'forum') {




More information about the Fusionforge-commits mailing list