Skip to content

Commit

Permalink
2.1.25.2
Browse files Browse the repository at this point in the history
Fix for #1179
  • Loading branch information
nilsteampassnet committed Jan 31, 2016
1 parent aa4fb01 commit 8683593
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sources/roles.queries.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,9 @@
$previous = 1;

//count nb of roles
if (empty($_SESSION['fonction_id'])) $where = "";
else $where = " WHERE id IN (".array_filter(str_replace(";", ",", $_SESSION['fonction_id'])).")";
$arrUserRoles = array_filter($_SESSION['user_roles']);
if (count($arrUserRoles) == 0) $where = "";
else $where = " WHERE id IN (".implode(',', $arrUserRoles).")";
DB::query("SELECT * FROM ".prefix_table("roles_title").$where);
$roles_count = DB::count();
if ($roles_count > $display_nb) {
Expand All @@ -247,7 +248,7 @@
}

// array of roles for actual user
$my_functions = explode(';', $_SESSION['fonction_id']);
$my_functions = $arrUserRoles;

//Display table header
$rows = DB::query(
Expand Down

0 comments on commit 8683593

Please sign in to comment.