Permalink
Browse files

MDL-31360 use extra param in get_in_or_equal - one less line of code...

  • Loading branch information...
1 parent 51f53e7 commit 828f09f28ecd5d4ba1ee093cf19f159b444fa63f @danmarsden danmarsden committed with wdjunaidi Feb 1, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/accesslib.php
View
@@ -6391,10 +6391,9 @@ public function get_capabilities() {
$extracaps = array_merge($subcaps, $extracaps);
$extra = '';
- $params = array();
- if (!empty($extracaps)) {
- list($extra, $params) = $DB->get_in_or_equal(
- $extracaps, SQL_PARAMS_NAMED, 'cap0');
+ list($extra, $params) = $DB->get_in_or_equal(
+ $extracaps, SQL_PARAMS_NAMED, 'cap0', true, '');
+ if (!empty($extra)) {
$extra = "OR name $extra";
}
$sql = "SELECT *

0 comments on commit 828f09f

Please sign in to comment.