Эх сурвалжийг харах

If you customize the permissions and restore the menu it puts the permissions back to default. Therefore I'm removing the restore permissions on the menu class and moving it to the a button on the group permissions page.

Mark Crane 12 жил өмнө
parent
commit
71249ff8dd

+ 2 - 41
includes/classes/menu.php

@@ -17,14 +17,14 @@
 
 	The Initial Developer of the Original Code is
 	Mark J Crane <[email protected]>
-	Copyright (C) 2010
+	Copyright (C) 2013
 	All Rights Reserved.
 
 	Contributor(s):
 	Mark J Crane <[email protected]>
 */
 
-//define the follow me class
+//define the menu class
 	class menu {
 		public $menu_uuid;
 
@@ -150,45 +150,6 @@
 								}
 						}
 					}
-					foreach($apps as $row) {
-						foreach ($row['permissions'] as $menu) {
-							//set the variables
-							if ($menu['groups']) {
-								foreach ($menu['groups'] as $group) {
-									//if the item uuid is not currently in the db then add it
-									$sql = "select * from v_group_permissions ";
-									$sql .= "where permission_name = '".$menu['name']."' ";
-									$sql .= "and domain_uuid = '".$_SESSION['domain_uuid']."' ";
-									$sql .= "and group_name = '$group' ";
-									$prep_statement = $db->prepare(check_sql($sql));
-									if ($prep_statement) {
-										$prep_statement->execute();
-										$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
-										unset ($prep_statement);
-										if (count($result) == 0) {
-											//insert the default menu into the database
-											$sql = "insert into v_group_permissions ";
-											$sql .= "(";
-											$sql .= "group_permission_uuid, ";
-											$sql .= "domain_uuid, ";
-											$sql .= "permission_name, ";
-											$sql .= "group_name ";
-											$sql .= ") ";
-											$sql .= "values ";
-											$sql .= "(";
-											$sql .= "'".uuid()."', ";
-											$sql .= "'".$_SESSION["domain_uuid"]."', ";
-											$sql .= "'".$menu['name']."', ";
-											$sql .= "'".$group."' ";
-											$sql .= ");";
-											$db->exec(check_sql($sql));
-											unset($sql);
-										}
-									}
-								}
-							}
-						}
-					}
 
 				//if there are no groups listed in v_menu_item_groups under menu_uuid then add the default groups
 					foreach($apps as $app) {