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

This commit is contained in:
Dan Marsden 2012-02-01 23:09:49 +13:00
parent d14c00e239
commit 2be99ddee8

View File

@ -6391,10 +6391,9 @@ class context_module extends context {
$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 *