Selaa lähdekoodia

Minor bugfix/code cleanup

Signed-off-by: Michael Eshom <[email protected]>
Michael Eshom 11 vuotta sitten
vanhempi
commit
3e229e139f
1 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 5 5
      Sources/Subs-Members.php

+ 5 - 5
Sources/Subs-Members.php

@@ -1030,7 +1030,7 @@ function groupsAllowedTo($permission, $board_id = null)
 		while ($row = $smcFunc['db_fetch_assoc']($request))
 			$member_groups[$row['add_deny'] === '1' ? 'allowed' : 'denied'][] = $row['id_group'];
 		$smcFunc['db_free_result']($request);
-		
+
 		$moderator_groups = array();
 
 		// "Inherit" any moderator permissions as needed
@@ -1049,15 +1049,15 @@ function groupsAllowedTo($permission, $board_id = null)
 					'board_id' => $board_id,
 				)
 			);
-			
+
 			while ($row = $smcFunc['db_fetch_assoc']($request))
 			{
 				$moderator_groups[] = $row['id_group'];
 			}
+
+			$smcFunc['db_free_result']($request);			
 		}
-		
-		$smcFunc['db_free_result']($request);
-		
+
 		// "Inherit" any additional permissions from the "Moderators" group		
 		foreach ($moderator_groups as $mod_group)
 		{