Commit e7cc200e authored by Dries's avatar Dries

- Patch by deekayen: roll back permission patch.

parent 59af92c8
......@@ -329,12 +329,12 @@ function user_access($string, $account = NULL) {
$result = db_query('SELECT DISTINCT(p.perm) FROM {role} r INNER JOIN {permission} p ON p.rid = r.rid INNER JOIN {users_roles} ur ON ur.rid = r.rid WHERE ur.uid = %d', $account->uid);
while ($row = db_fetch_object($result)) {
$perm[$account->uid][] = $row->perm;
$perm[$account->uid] .= "$row->perm, ";
}
}
if (isset($perm[$account->uid])) {
return in_array($string, $perm[$account->uid]);
return strstr($perm[$account->uid], "$string, ");
}
return FALSE;
......
......@@ -329,12 +329,12 @@ function user_access($string, $account = NULL) {
$result = db_query('SELECT DISTINCT(p.perm) FROM {role} r INNER JOIN {permission} p ON p.rid = r.rid INNER JOIN {users_roles} ur ON ur.rid = r.rid WHERE ur.uid = %d', $account->uid);
while ($row = db_fetch_object($result)) {
$perm[$account->uid][] = $row->perm;
$perm[$account->uid] .= "$row->perm, ";
}
}
if (isset($perm[$account->uid])) {
return in_array($string, $perm[$account->uid]);
return strstr($perm[$account->uid], "$string, ");
}
return FALSE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment